Processing math: 100%
k-th digit - MarisaOJ: Marisa Online Judge

k-th digit

Time limit: 1000 ms
Memory limit: 256 MB

Write down all positive integers in ascending order in a row like this: 1234567891011121314....

What is the kth digit?

Input

  • The first line an integer k.

Output

  • Print the kth digit.

Constraints

  • 1≤k≤1018.

Example

Input:

14

Output:

1