2 3 4
12
Takahashi can obtain $12$ blue jewels of level $1$ by the following conversions.
* First, he converts a red jewel of level $2$ into a red jewel of level $1$ and $3$ blue jewels of level $2$.
* After this operation, Takahashi has $1$ red jewel of level $1$ and $3$ blue jewels of level $2$.
* 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$.
* After these operations, Takahashi has $4$ red jewels of level $1$ and $12$ blue jewels of level $1$.
* He cannot perform a conversion anymore.
He cannot obtain more than $12$ blue jewels of level $1$, so the answer is $12$.1 5 5
0 Takahashi may not be able to obtain a blue jewel of level $1$.
10 5 5
3942349900 Note that the answer may not fit into a $32$\-bit integer type.
{
"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 r...",
"is_translate": false,
"language": "English"
}
]
}