Conversion of fractions to whole numbers