{"raw_statement":[{"iden":"problem statement","content":"Takahashi has a red jewel of level $N$. (He has no other jewels.)  \nTakahashi can do the following operations any number of times.\n\n*   Convert a red jewel of level $n$ ($n$ is at least $2$) into \"a red jewel of level $(n-1)$ and $X$ blue jewels of level $n$\".\n*   Convert a blue jewel of level $n$ ($n$ is at least $2$) into \"a red jewel of level $(n-1)$ and $Y$ blue jewels of level $(n-1)$\".\n\nTakahashi wants as many blue jewels of level $1$ as possible. At most, how many blue jewels of level $1$ can he obtain by the operations?"},{"iden":"constraints","content":"*   $1 \\leq N \\leq 10$\n*   $1 \\leq X \\leq 5$\n*   $1 \\leq Y \\leq 5$\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$ $X$ $Y$"},{"iden":"sample input 1","content":"2 3 4"},{"iden":"sample output 1","content":"12\n\nTakahashi can obtain $12$ blue jewels of level $1$ by the following conversions.\n\n*   First, he converts a red jewel of level $2$ into a red jewel of level $1$ and $3$ blue jewels of level $2$.\n    *   After this operation, Takahashi has $1$ red jewel of level $1$ and $3$ blue jewels of level $2$.\n*   Next, he repeats the following conversion $3$ times: converting a blue jewel of level $2$ into a red jewel of level $1$ and $4$ blue jewels of level $1$.\n    *   After these operations, Takahashi has $4$ red jewels of level $1$ and $12$ blue jewels of level $1$.\n*   He cannot perform a conversion anymore.\n\nHe cannot obtain more than $12$ blue jewels of level $1$, so the answer is $12$."},{"iden":"sample input 2","content":"1 5 5"},{"iden":"sample output 2","content":"0\n\nTakahashi may not be able to obtain a blue jewel of level $1$."},{"iden":"sample input 3","content":"10 5 5"},{"iden":"sample output 3","content":"3942349900\n\nNote that the answer may not fit into a $32$\\-bit integer type."}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}