{"problem":{"name":"123 Set","description":{"content":"You are given a positive integer $N$. There is an empty set $S$, and you can perform the following operation any number of times: *   Choose any positive integer $x$. For each of $x$, $2x$, and $3x$,","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":8000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"arc184_b"},"statements":[{"statement_type":"Markdown","content":"You are given a positive integer $N$. There is an empty set $S$, and you can perform the following operation any number of times:\n\n*   Choose any positive integer $x$. For each of $x$, $2x$, and $3x$, add it to $S$ if it is not already in $S$.\n\nFind the minimum number of operations required to satisfy ${1, 2, \\dots, N} \\subseteq S$.\n\n## Constraints\n\n*   $1 \\leq N \\leq 10^{9}$\n\n## Input\n\nThe input is given from Standard Input in the following format:\n\n$N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"arc184_b","tags":[],"sample_group":[["7","4\n\nChoosing $1$, $2$, $5$, and $7$ yields $S = {1, 2, 3, 4, 5, 6, 7, 10, 14, 15, 21}$, which satisfies the condition. It is impossible to satisfy the condition with three or fewer operations."],["25","14"]],"created_at":"2026-03-03 11:01:14"}}