CF1177A.Digits Sequence (Easy Edition)

传统题 时间 2000 ms 内存 256 MiB 5 尝试 1 已通过 1 标签

Digits Sequence (Easy Edition)

Let's write all the positive integer numbers one after another from 11 without any delimiters (i.e. as a single string). It will be the infinite sequence starting with 123456789101112131415161718192021222324252627282930313233343536...

Your task is to print the kk-th digit of this sequence.

Input

The first and only line contains integer kk (1k100001 \le k \le 10000) — the position to process (11-based index).

Output

Print the kk-th digit of the resulting infinite sequence.

Samples

7
7
21
5

在线编程 IDE

建议全屏模式获得最佳体验