Calculating number of moles