Replace decimal calculations by plain int ones