{"problem":{"name":"Leading 1s","description":{"content":"For an integer $x$, let $f(x)$ be the number of leading ones in the decimal notation of $x$. For example, we have $f(1)=1,f(2)=0,f(10)=1,f(11)=2,f(101)=1$. Given an integer $N$, find $f(1)+f(2)+\\cdots","description_type":"Markdown"},"platform":"AtCoder","limit":{"time_limit":2000,"memory_limit":262144},"difficulty":"None","is_remote":true,"is_sync":true,"sync_url":null,"sign":"arc127_a"},"statements":[{"statement_type":"Markdown","content":"For an integer $x$, let $f(x)$ be the number of leading ones in the decimal notation of $x$. For example, we have $f(1)=1,f(2)=0,f(10)=1,f(11)=2,f(101)=1$.\nGiven an integer $N$, find $f(1)+f(2)+\\cdots+f(N)$.\n\n## Constraints\n\n*   $1 \\leq N \\leq 10^{15}$\n*   All values in input are integers.\n\n## Input\n\nInput is given from Standard Input in the following format:\n\n$N$\n\n[samples]","is_translate":false,"language":"English"}],"meta":{"iden":"arc127_a","tags":[],"sample_group":[["11","4\n\nWe have $f(2)=f(3)=\\cdots =f(9)=0$. The answer is $f(1)+f(10)+f(11)=4$."],["120","44"],["987654321","123456789"]],"created_at":"2026-03-03 11:01:14"}}