Testing Round 15 (Unrated)
A
Digits Sequence (Easy Edition)
Codeforces
1000
原题
←B →
翻译中…

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

翻译中…

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

翻译中…

Input

翻译中…

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

翻译中…

Output

翻译中…

Print the $k$-th digit of the resulting infinite sequence.

翻译中…

样例

Input #1
7
Output #1
7
InputCopy OutputCopy
Input #2
21
Output #2
5
InputCopy OutputCopy
题目信息
题号
1177A
时间限制
1 s
内存限制
256 MB
标签
模拟

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。