Bob goes to the fruit shop to buy apples. There are apples numbered from to where the vitamin value of the apple is and the price of the apple is .
He wants to buy apples such that the sum of the price does not exceed . He has one special magic spell. By using it, he can halve the price (floor value) of any apple present in a shop. He can use this spell at most one time.
Your task is to find the maximum vitamin Bob can get.
Input format
Output format
For each test case, the only line must contain an integer denoting the maximum vitamin Bob can get.
Constraints
Here, Shengij will perform the magic spell on apple number and he will buy and apples to maximize the total vitamin.