Problem A: 数列求值

Time Limit: 1 Sec Memory Limit: 128 MB

Description

从1开始数数,从左到右一边数数一边写下所数的数字,形成一个无限长的数字序列,其值为 12345678910111213141516171819202122……

现在问这个序列从左开始数起第N位的数字是什么。


Input

输入只有一行,代表正整数N (1<=N<=1000000000)


Output

输出一行,代表第N位数字的值


Sample Input

19

Sample Output

4