Calculating mass of reactants and products