Raman is in Rajat's room and has discovered a pile of oranges and a pile of apples in his bag ( unlimited number of each, yes rajat has a very large bag), and he is determined to eat as much as possible.
Raman has a maximum fullness of F.Eating an orange increases his fullness by X, and eating an apple increases his fullness by Y . Additionally, if he wants, Raman can drink water at most one time, which will reduce his fullness to half (will round down) instantly.
Help Raman determine the maximum fullness that he can achieve .
Input Format
The first and only line has 3 space separated integers F,X and Y.
Constraints
1≤F≤5000000
1≤X,Y≤F
Output Format
Output one line of integer the maximum fullness that raman can achieve.
Raman can achieve maximum fullness of 10
Eat orange ,then drink water and then eat apple.