{"raw_statement":[{"iden":"problem statement","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)$."},{"iden":"constraints","content":"*   $1 \\leq N \\leq 10^{15}$\n*   All values in input are integers."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$"},{"iden":"sample input 1","content":"11"},{"iden":"sample output 1","content":"4\n\nWe have $f(2)=f(3)=\\cdots =f(9)=0$. The answer is $f(1)+f(10)+f(11)=4$."},{"iden":"sample input 2","content":"120"},{"iden":"sample output 2","content":"44"},{"iden":"sample input 3","content":"987654321"},{"iden":"sample output 3","content":"123456789"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}