if ( billsec % 6 == 0 ) { #correct slice total = billsec/6; } else { #should go up total = ((int) billsec/6 ) +1; }