Determining the Formula of a Compound