~/algor $ cat contests/round-6/J
J. A digit of the endless line
Problem J
ICPC rules
1000 ms
64 MB
All positive integers are written one after another in increasing order with no spaces: 123456789101112131415…. Find digit number of this line (digits are numbered from ).
Input
One positive integer .
Output
One digit — digit number of the line.
Note
Examples
Input #1
15
Output #1
2
Input #2
11
Output #2
0