How to split the Billion or million : I am looking for an algorithm which splits the input number to number of millions .


suppose if the input number is 51000000 and my lot size is 50 million, then i want an output as 2.
if 110 million, then it would be 50+50+10 which means output as 3.

I tried a number of ways to calculate, but still i am unlucky , please give some clue on this