LearnPy Hub
← Arena
IntermediateRating 1400

The n-th Digit

Write all positive integers one after another: 123456789101112… Print the n-th digit.

Input

One integer n (1 ≤ n ≤ 10¹⁵).

Output

One digit.

Sample 1

Input
3
Output
3

Sample 2

Input
11
Output
0
solution.py
Output appears here
The n-th Digit · Python Arena problem · LearnPy Hub