Converting fractions to whole numbers