{"problem":{"name":"Changing Jewels","description":{"content":"Takahashi has a red jewel of level $N$. (He has no other jewels.)   Takahashi can do the following operations any number of times. *   Convert a red jewel of level $n$ ($n$ is at least $2$) into \"a r","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc260_c"},"statements":[{"statement_type":"Markdown","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?\n\n## Constraints\n\n*   $1 \\leq N \\leq 10$\n*   $1 \\leq X \\leq 5$\n*   $1 \\leq Y \\leq 5$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$ $X$ $Y$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc260_c","tags":[],"sample_group":[["2 3 4","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$."],["1 5 5","0\n\nTakahashi may not be able to obtain a blue jewel of level $1$."],["10 5 5","3942349900\n\nNote that the answer may not fit into a $32$\\-bit integer type."]],"created_at":"2026-03-03 11:01:14"}}