how to write a formula for a compoundchemistry