Calculating molarity and molality.