Easy IPhone - HackerEarth Problem Solution

Easy IPhone - HackerEarth Problem Solution :
          Ricky is crazy about IPhones. He has X number of IPhones, he can use only one IPhone for a year. After one year of use an IPhone becomes useless and he cannot use it anymore. He will get one new IPhone if he will return 'y' number of useless IPhones. Tell for how many years, he can use IPhones ?

Input:

10 4

Output:

13

PHP Implementation: