#abc260c. [abc260_c]Changing Jewels

[abc260_c]Changing Jewels

Problem Statement

Takahashi has a red jewel of level NN. (He has no other jewels.)
Takahashi can do the following operations any number of times.

  • Convert a red jewel of level nn (nn is at least 22) into "a red jewel of level (n1)(n-1) and XX blue jewels of level nn".
  • Convert a blue jewel of level nn (nn is at least 22) into "a red jewel of level (n1)(n-1) and YY blue jewels of level (n1)(n-1)".

Takahashi wants as many blue jewels of level 11 as possible. At most, how many blue jewels of level 11 can he obtain by the operations?

Constraints

  • 1leqNleq101 \\leq N \\leq 10
  • 1leqXleq51 \\leq X \\leq 5
  • 1leqYleq51 \\leq Y \\leq 5
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

NN XX YY

Output

Print the answer.


Sample Input 1

2 3 4

Sample Output 1

12

Takahashi can obtain 1212 blue jewels of level 11 by the following conversions.

  • First, he converts a red jewel of level 22 into a red jewel of level 11 and 33 blue jewels of level 22.
    • After this operation, Takahashi has 11 red jewel of level 11 and 33 blue jewels of level 22.
  • Next, he repeats the following conversion 33 times: converting a blue jewel of level 22 into a red jewel of level 11 and 44 blue jewels of level 11.
    • After these operations, Takahashi has 44 red jewels of level 11 and 1212 blue jewels of level 11.
  • He cannot perform a conversion anymore.

He cannot obtain more than 1212 blue jewels of level 11, so the answer is 1212.


Sample Input 2

1 5 5

Sample Output 2

0

Takahashi may not be able to obtain a blue jewel of level 11.


Sample Input 3

10 5 5

Sample Output 3

3942349900

Note that the answer may not fit into a 3232-bit integer type.