Akash's Contest (Contest)
Akash's Contest (Contest) easy Time Limit: 2 sec Memory Limit: 128000 kB
Last updated
Akash's Contest (Contest) easy Time Limit: 2 sec Memory Limit: 128000 kB
Last updated
Problem Statement :
This morning the problem setters decided to add one more easy problem to the problem set of Newton School. Akash has printed the statement in one copy, and now they want to make n more copies before starting the contest. They have 2 copiers in the office, one which copies a sheet in x seconds and the other in y seconds (Using both copiers at the same time is allowed). You can copy not only from the original but from the copied copies. Help him to find out what is the minimum time they need to make n copies of the statement. 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
link: