There is a gift which costs you Z tokens. There is a general machine which provides you 2 tokens/second .
If you get X tokens then with that tokens you can buy a special machine which provides you an extra Y tokens (you can also use general machine same time) . Print minimum time taken to buy the gift.
Note : Neglect time of buying special machine and more than one special machines can be bought
Input format : X Y Z (given)
Input : 4 5 10
Output : 4
Any ideas???