{"problem":{"name":"Caracal vs Monster","description":{"content":"Caracal is fighting with a monster. The _health_ of the monster is $H$. Caracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happen","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"abc153_d"},"statements":[{"statement_type":"Markdown","content":"Caracal is fighting with a monster.\nThe _health_ of the monster is $H$.\nCaracal can attack by choosing one monster. When a monster is attacked, depending on that monster's health, the following happens:\n\n*   If the monster's health is $1$, it drops to $0$.\n*   If the monster's health, $X$, is greater than $1$, that monster disappears. Then, two new monsters appear, each with the health of $\\lfloor X/2 \\rfloor$.\n\n($\\lfloor r \\rfloor$ denotes the greatest integer not exceeding $r$.)\nCaracal wins when the healths of all existing monsters become $0$ or below.\nFind the minimum number of attacks Caracal needs to make before winning.\n\n## Constraints\n\n*   $1 \\leq H \\leq 10^{12}$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$H$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"abc153_d","tags":[],"sample_group":[["2","3\n\nWhen Caracal attacks the initial monster, it disappears, and two monsters appear, each with the health of $1$.\nThen, Caracal can attack each of these new monsters once and win with a total of three attacks."],["4","7"],["1000000000000","1099511627775"]],"created_at":"2026-03-03 11:01:13"}}