eolymp
bolt
Try our new interface for solving problems
Problems

Row of numbers

Row of numbers

All integers starting with $1$ are written in one line $"123456789101112131415..."$. Your task is to print the $n$-th digit of this string (digits are numbered starting with $1$). \InputFile One integer $n~(1 \le n \le 10000)$ --- the position of the digit you need to print. \OutputFile Print the $n$-th digit of the line.
Time limit 1 second
Memory limit 128 MiB
Input example #1
5
Output example #1
5
Input example #2
15
Output example #2
2