Calculating mass of compound in a solution