A. Cakes
Vitaliy wants to buy exactly cakes. He has two purchasing options:
Buy 1 cake for 1 coin.
Buy cakes for coins.
Determine the minimum number of coins Vitaliy needs to spend to purchase exactly cakes.
Input
The input consists of a single line containing two integers and (), where is the number of cakes to be purchased and is the number of coins required for the second type of purchase.
Output
Output a single integer representing the minimum number of coins needed to buy exactly cakes.
Examples
Note
In the first example, Vitaliy can buy 3 cakes for 2 coins and then buy 1 cake twice for 1 coin each. This results in a total of coins.
In the second example, Vitaliy can simply buy 1 cake for 1 coin.
Scoring
Solutions that correctly handle the constraints will earn 20% of the total points.