How to write formulas for acids