{"raw_statement":[{"iden":"problem statement","content":"Find the maximum possible sum of the digits (in base $10$) of a positive integer not greater than $N$."},{"iden":"constraints","content":"*   $1\\leq N \\leq 10^{16}$\n*   $N$ is an integer."},{"iden":"input","content":"Input is given from Standard Input in the following format:\n\n$N$"},{"iden":"sample input 1","content":"100"},{"iden":"sample output 1","content":"18\n\nFor example, the sum of the digits in $99$ is $18$, which turns out to be the maximum value."},{"iden":"sample input 2","content":"9995"},{"iden":"sample output 2","content":"35\n\nFor example, the sum of the digits in $9989$ is $35$, which turns out to be the maximum value."},{"iden":"sample input 3","content":"3141592653589793"},{"iden":"sample output 3","content":"137"}],"translated_statement":null,"sample_group":[],"show_order":["default"],"formal_statement":null,"simple_statement":null,"has_page_source":true}