Question
Optimal Copy Time

This morning, the event organizers at Tech Academy decided to add an extra problem to their upcoming coding contest. Mia has already printed one copy of the problem statement, but they now need n additional copies before the contest begins. They have two copy machines available: one can make a copy in x seconds, and the other in y seconds. Both machines can operate simultaneously, and copies can be made not only from the original but also from previously made copies. Can you help Mia determine the minimum time needed to create n copies?

Input
The first line of the input contains three space-separated integers n, x, and y.

Constraints
1 ≤ n ≤ 2.108
1 ≤ x, y ≤ 10
Output
Print one integer, the minimum time in seconds required to get n copies.
Example
Sample Input
4 1 1
Sample Output
3

Sample Input
5 1 2
Sample Output
4

Online