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.


-----Examples-----
Input
7

Output
7

Input
21

Output
5

Difficulty: EASY
Tags: Implementation

Starter code:

Solutions:
def main():
	req = ''.join((str(x) for x in range(1, 10001)))
	k = int(input())
	print(int(req[k - 1]))
main()


s = ''
for i in range(1, 10001):
	s += str(i)
k = int(input())
print(s[k - 1])


k = int(input())
temp = ''
for num in range(1, 10000):
	temp += str(num)
print(temp[k - 1])


s = ''
for i in range(1, 5000):
	s += str(i)
print(s[int(input()) - 1])


t = int(input())
i = 1
s = ''
while i <= t:
	s += str(i)
	i += 1
print(s[t - 1])


n = int(input())
ar = map(str, range(1, 10001))
s = ''
d = s.join(ar)
print(d[n - 1])


k = int(input())
i = 1
while k > 9 * i * 10 ** (i - 1):
	k -= 9 * i * 10 ** (i - 1)
	i += 1
j = (k - 1) // i
k = k - j * i
print(str(10 ** (i - 1) + j)[k - 1])


s = ''
for i in range(1, 3000):
	s += str(i)
k = int(input())
print(s[k - 1])


n = int(input())
sum = ''
i = 0
for i in range(40001):
	if len(sum) > n:
		break
	sum += str(i)
	i += 1
print(sum[n])


n = int(input())
s = 0
i = 1
c = 1
while s < n:
	s += 9 * i * c
	c += 1
	i *= 10
n = n - s + 9 * i * (c - 1) // 10
c = c - 1
r = n % c
d = n // c
k = 10 ** (c - 1) + d
if r == 0:
	print(int(str(k - 1)[-1]))
else:
	print(int(str(k)[r - 1]))


n = int(input())
step = 9
count = 0
digit = 1
while count + digit * step < n:
	count += digit * step
	step *= 10
	digit += 1
i = n - count
k = int((i + (digit - 1)) / digit)
num = 10 ** (digit - 1) + (k - 1)
j = digit - (i + digit - 1) % digit - 1
while j > 0:
	num = int(num / 10)
	j -= 1
print(num % 10)


import os
import sys
import math
from io import BytesIO, IOBase
from fractions import Fraction
import collections
from itertools import permutations
from collections import defaultdict
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
n = int(input()) - 1
(x, y) = (1, 9)
while n > x * y:
	(n, x, y) = (n - x * y, x + 1, y * 10)
a = str(10 ** (x - 1) + n // x)[n % x]
print(a)


import sys
numstring = ''
for k in range(1, 10001):
	numstring += str(k)
print(numstring[int(input()) - 1])


k = int(input())
n = 1
up_bnd = 9
while k > up_bnd:
	n += 1
	up_bnd += 9 * n * 10 ** (n - 1)
low_bnd = 0
for i in range(1, n):
	low_bnd += 9 * i * 10 ** (i - 1)
num = int((k - low_bnd) / n)
lb_val = 0
for i in range(n - 1):
	lb_val = lb_val * 10 + 9
num += lb_val
rm = (k - low_bnd) % n
if rm != 0:
	num += 1
ans = 0
if rm == 0:
	ans = num % 10
else:
	for i in range(n - rm + 1):
		j = num % 10
		num = int(num / 10)
		ans = j
print(int(ans))


s = ''.join([str(x) for x in range(1, 2778)])
print(s[int(input()) - 1])


n = int(input())
maxlength = 12
lengths = [1]
for i in range(1, maxlength + 1):
	lengths.append(lengths[i - 1] + 9 * i * 10 ** (i - 1))

def getnum(n):
	global lengths
	mx = maxlength - 1
	mn = 0
	while 1:
		chk = (mx - mn) // 2
		if chk == 0:
			break
		chk += mn
		if n < lengths[chk]:
			mx = chk
		else:
			mn = chk
	curlength = mx
	curlength_ind = n - lengths[curlength - 1]
	curdigind = curlength_ind % curlength
	beforenumscount = curlength_ind // curlength
	result = 0 + (beforenumscount // 10 ** (curlength - curdigind - 1) + (curdigind == 0)) % 10
	return result
print(getnum(n))


k = int(input())
s = ''
for i in range(1, 10001):
	if len(s) >= 10000:
		break
	s += str(i)
print(s[k - 1])


s = []
k = int(input())
for i in range(1, k + 1):
	s.append(i)
s = ''.join(map(str, s))
print(s[k - 1])


x = int(input())
z = []
for n in range(1, x + 1):
	z += [int(k) for k in str(n)]
print(z[x - 1])


n = int(input())
s = ''
for i in range(1, n + 1):
	s = s + str(i)
print(s[n - 1])


k = int(input()) - 1
l = 1
c = 9
while k >= c * l:
	k -= c * l
	l += 1
	c *= 10
c = 10 ** (l - 1) + k // l
print(str(c)[k % l])


k = int(input(''))
y = 9
x = 1
i = 2
m = 0
if k < 10:
	print(k)
else:
	while k > y:
		h = y
		y = y + 9 * i * 10 ** x
		x += 1
		i += 1
	z = 10 ** (i - 1) + (k - y - 1) // (i - 1)
	q = (k - h - 1) % (i - 1)
	print(str(z)[q])


list = []
n = int(input())
for i in range(1, 10000):
	list.append(i)
str_join = ''.join((str(x) for x in list))
print(str_join[n - 1])


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
for t in range(1):
	string = ''
	for i in range(1, 10002):
		string += str(i)
	n = int(input())
	print(string[n - 1])


k = int(input())
total_digit = 0
digit = 1
while k > total_digit + digit * (pow(10, digit) - pow(10, digit - 1)):
	total_digit += digit * (pow(10, digit) - pow(10, digit - 1))
	digit += 1
remaining = k - total_digit - 1
corr_num = str(pow(10, digit - 1) + remaining // digit)
print(corr_num[remaining % digit])


p = int(input())
s = ''
for i in range(10000):
	s += str(i)
print(s[p])


n = int(input()) - 1
(x, y) = (1, 9)
while n > x * y:
	(n, x, y) = (n - x * y, x + 1, y * 10)
a = str(10 ** (x - 1) + n // x)[n % x]
print(a)


s = ''
i = 1
while len(s) < 10000:
	s += str(i)
	i += 1
print(s[int(input()) - 1])


s = ''
for i in range(10000):
	s += str(i)
n = int(input())
print(s[n])


def f(r, k, x):
	s = ''
	w = 10 ** (r - 1)
	j = x
	while j <= k:
		s += str(w)
		w += 1
		j += r
	return s[k - x]
k = int(input())
if k <= 9:
	print(k)
elif 10 <= k <= 189:
	print(f(2, k, 10))
elif 190 <= k <= 2889:
	print(f(3, k, 190))
elif 2890 <= k <= 38889:
	print(f(4, k, 2890))
elif 38890 <= k <= 488889:
	print(f(5, k, 38890))
elif 488890 <= k <= 5888889:
	print(f(6, k, 488890))
elif 5888890 <= k <= 68888889:
	print(f(7, k, 5888890))
elif 68888890 <= k <= 788888889:
	print(f(8, k, 68888890))
elif 788888890 <= k <= 8888888889:
	print(f(9, k, 788888890))
elif 8888888890 <= k <= 98888888889:
	print(f(10, k, 8888888890))
else:
	print(f(11, k, 98888888890))


k = int(input())
s = ''
i = 1
while len(s) < k + 10:
	s += str(i)
	i += 1
k -= 1
print(s[k])


s = '1'
n = int(input())
for i in range(2, 5000):
	s = s + str(i)
print(s[n - 1])


n = int(input())
res = ''
i = 0
while len(res) <= n:
	res += str(i)
	i += 1
print(res[n])


import math
n = int(input())
k = 1
while n > 9 * k * 10 ** (k - 1):
	n = n - 9 * k * 10 ** (k - 1)
	k = k + 1
remainder = n % k
if remainder == 0:
	remainder = k
if k == 1:
	quoteint = math.ceil(n / k)
else:
	adder = '9' * (k - 1)
	adder = int(adder)
	quoteint = math.ceil(n / k) + adder
print(str(quoteint)[remainder - 1])


a = []
i = 1
while len(a) <= 10000:
	l = str(i)
	for p in l:
		a.append(p)
	i += 1
g = int(input())
print(a[g - 1])


import sys
k = int(input())
d = [0]
for i in range(1, 12):
	d.append((10 ** i - 10 ** (i - 1)) * i + d[i - 1])
for i in range(1, len(d)):
	if k <= d[i]:
		f = d[i - 1]
		f1 = 10 ** (i - 1)
		print(str((k - f - 1) // i + f1)[(k - f - 1) % i])
		sys.exit()


import sys

class ADigitsSequenceEasyEdition:

	def solve(self):
		k = int(input()) + 1
		p = 1
		c = 0
		while c + p * (10 ** p - (10 ** (p - 1) if p > 1 else 0)) < k:
			c += p * (10 ** p - (10 ** (p - 1) if p > 1 else 0))
			p += 1
		k -= c
		bef = (10 ** (p - 1) if p > 1 else 0) + (k - 1) // p
		print(str(bef)[(k - 1) % p], end='')
solver = ADigitsSequenceEasyEdition()
input = sys.stdin.readline
solver.solve()


n = int(input())
seq = []
for i in range(9000):
	num = [int(x) for x in str(i)]
	for j in num:
		seq.append(j)
print(seq[n])


k = int(input())
s = ''
a = 1
while len(s) < k:
	s += str(a)
	a += 1
print(s[k - 1])


n = int(input())
sequence = 0
digit = 0
while True:
	digit += 1
	a = 10 ** (digit - 1)
	b = int('9' * digit)
	sequence = (b - a + 1) * digit
	if n < sequence:
		break
	else:
		n -= sequence
rem = n % digit
order = n // digit
if rem != 0:
	x = 1
else:
	x = 0
term = str(a + (order + x - 1))
print(term[rem - 1])


k = int(input())
c = ''
i = 1
while len(c) <= k:
	c += str(i)
	i += 1
print(c[k - 1])


k = int(input(''))
a = [9]
i = 1
if k < 10:
	print(k)
else:
	while k > a[-1]:
		a.append((10 ** (i + 1) - 10 ** i) * (i + 1) + a[i - 1])
		i += 1
	cat = len(a)
	diff = k - a[-2]
	step = int(diff / cat)
	rem = diff % cat
	if rem == 0:
		number = 10 ** (cat - 1) - 1 + step
		print(str(number)[-1])
	else:
		number = 10 ** (cat - 1) + step
		print(str(number)[rem - 1])


S = ''
for i in range(1, 10001):
	S += str(i)
print(S[int(input()) - 1])


a = ''
x = int(input())
for i in range(1, x + 1):
	a += str(i)
print(a[x - 1])


s = '0'
for i in range(1, 10000):
	s += str(i)
print(s[int(input())])


def main():
	q = int(input())
	s = ''
	for i in range(1, 5001):
		s = s + str(i)
	print(s[q - 1])
main()


sum = [0 for i in range(12)]
i = 0
while sum[i] < 10 ** 12:
	i += 1
	sum[i] = sum[i - 1] + i * (10 ** i - 10 ** (i - 1))
k = int(input())
i = 0
while k > sum[i]:
	i += 1
ans = 10 ** (i - 1) - 1
ans += (k - sum[i - 1]) // i
if (k - sum[i - 1]) % i != 0:
	ans += 1
print(str(ans)[(k - sum[i - 1]) % i - 1])


k = int(input())
c = 0
for i in range(1, 10000):
	i_str = str(i)
	c += len(i_str)
	if c - len(i_str) < k <= c:
		print(i_str[len(i_str) + k - c - 1])
		break


l = list(map(str, range(1, 10001)))
l = ''.join(l)
n = int(input())
print(l[n - 1])


print(''.join(map(str, range(1, 3000)))[int(input().strip()) - 1])


a = set(range(0, 10001))
x = str(a)
x = x.replace(',', '')
x = x.replace(' ', '')
x = x.replace('{', '')
x = x.replace('}', '')
x1 = int(input(' '))
print(x[x1])


a = int(input())
s = ''
for i in range(1, a + 1):
	s += str(i)
print(s[a - 1])


e = ''
for i in range(1, 10000):
	e = e + str(i)
n = int(input())
print(e[n - 1])


num = ''
count = 1
k = int(input())
while len(num) <= k:
	num += str(count)
	count += 1
print(num[k - 1])


k = int(input())
ans = ''
for i in range(10001):
	ans += str(i + 1)
print(ans[k - 1])


k = ''.join(map(str, range(10000)))
print(k[int(input())])


a = int(input())
c = [1] * 30
for i in range(1, 20):
	c[i] = 9 * i * pow(10, i - 1)
for i in range(1, 15):
	if a > c[i]:
		a -= c[i]
	else:
		d = int((a - 1) / i + pow(10, i - 1) - 1)
		e = (a - 1) % i + 1
		f = str(d + 1)
		print(f[e - 1])
		exit()


print(''.join(map(str, range(9999)))[int(input())])


pre_cal_sum_dec = {}

def sum_dec(n):
	global pre_cal_sum_dec
	try:
		return pre_cal_sum_dec[n]
	except:
		sumer = 0
		for i in range(1, n):
			sumer += 10 ** i
		pre_cal_sum_dec[n] = sumer
		return sumer

def find_head(digits):
	if digits < 1:
		return 0
	elif digits == 1:
		return 1
	else:
		return (digits - 1) * 10 ** (digits - 1) - sum_dec(digits - 1)
list_of_head = [find_head(i) for i in range(18)]

def finder(number):
	(x, i) = (0, 1)
	if number == 1:
		return 1
	for x in list_of_head[1:]:
		if x > number:
			break
		bef = x
		i += 1
	if x == number:
		return 1
	e = i - 1
	number = number - bef
	interval = e * 10 ** (e - 1)
	col = number % e
	if col == 0:
		return (number // interval + 1) % 10
	return number // (e * 10 ** (e - 1 - col)) % 10
print(finder(int(input())))


n = int(input())

def find(n):
	(y, x) = (-1, 10000000000000)
	while y + 1 != x:
		m = (y + x) // 2
		if con(m) >= n:
			x = m
		else:
			y = m
	return str(x)[n - con(y) - 1]

def con(x):
	(s, q, z) = (0, 1, 0)
	while x != 0:
		z = min(x, 9 * 10 ** (q - 1))
		x = x - z
		s += z * q
		q += 1
	return s
print(find(n))


n = int(input())
s = ''
for u in range(1, n + 1):
	s += str(u)
print(s[n - 1])


def f(n):
	kakn = 9
	n -= 1
	chisl = 1
	while kakn < n:
		kakn += 9 * 10 ** chisl * (chisl + 1)
		chisl += 1
		if n - kakn == 2:
			return 0
	t = kakn - 9 * 10 ** (chisl - 1) * chisl
	n -= t
	p = n // chisl
	u = n % chisl
	o = str(10 ** (chisl - 1) + p)
	return o[u]
n = int(input())
print(f(n))


n = int(input())
i = 0
s = 0
while True:
	temp = (i + 1) * 9 * 10 ** i
	if s + temp <= n:
		s += temp
		i += 1
	else:
		break
tc = n - s
nd = tc // (i + 1) - 1
tc -= (nd + 1) * (i + 1)
f = 10 ** i + nd
if tc != 0:
	print(str(10 ** i + nd + 1)[tc - 1])
else:
	print(str(10 ** i + nd)[-1])


n = int(input())
ch = ''
i = 1
while len(ch) < n:
	ch = ch + str(i)
	i += 1
print(ch[n - 1])


n = int(input()) - 1
i = 0
while n >= 9 * (i + 1) * 10 ** i:
	n -= 9 * (i + 1) * 10 ** i
	i += 1
a = int(pow(10, i)) + int(n / (i + 1))
print(str(a)[n % (i + 1)])


d = [i for i in range(0, 10001)]
for i in range(len(d)):
	d[i] = str(d[i])
d = ''.join(d)
p = int(input())
print(d[p])


a = int(input())
b = ''
for i in range(1, 10000):
	b += str(i)
print(b[a - 1])


k = int(input())
s = ''
for i in range(1, 10000):
	s += str(i)
print(s[k - 1])


N = int(input())
beg = 0
end = 9
i = 0
while N > end:
	i += 1
	(beg, end) = (end, end + (i + 1) * 9 * 10 ** i)
n = N - beg - 1
lvl = i - n % (i + 1)
period = (i + 1) * 10 ** lvl
res = n // period % 10
if lvl == i:
	res += 1
print(res)


a = ''
x = 1
while len(a) <= 10001:
	a += str(x)
	x += 1
n = int(input())
print(int(a[n - 1]))


s = ''
k = int(input())
for i in range(1, 10000):
	if len(s) >= k:
		print(s[k - 1])
		exit()
	s += str(i)


__author__ = 'Esfandiar'
n = int(input())
i = 1
s = ''
while i <= n:
	s += str(i)
	i += 1
print(s[n - 1])


k = int(input())
s = 1
i = 1
while s <= k:
	s = s + 9 * i * 10 ** (i - 1)
	i = i + 1
i = i - 1
s = s - 9 * i * 10 ** (i - 1)
t = i - (k - s) % i
n = 10 ** (i - 1) + int((k - s) / i)
while t:
	r = n % 10
	n = int(n / 10)
	t = t - 1
print(r)


def sequence(n):
	s = ''
	for i in range(1, 10001):
		s += str(i)
	return s[n - 1]
print(sequence(int(input())))


k = int(input())
if k <= 9:
	print(k)
else:
	num_arr = [9 * (i + 1) * 10 ** i for i in range(11)]
	index = 0
	while True:
		if k <= num_arr[index]:
			break
		else:
			k -= num_arr[index]
			index += 1
	digit = index + 1
	k += digit - 1
	num = k // digit
	offset = k % digit
	string_num = str(10 ** (digit - 1) + num - 1)
	print(string_num[offset])


k = int(input(''))
t = 0
if k == 0:
	print('Invalid input')
	exit()
d = 0
e = 0
n = 5
while 1:
	u = 9 * n * 10 ** n + 1 - 10 ** n - 9 * k
	if u > 0:
		d += 1
		if e > 0:
			u = i
			break
		n = n - 1
	elif u < 0:
		i = u
		e += 1
		if d > 0:
			n = n + 1
			break
		n = n + 1
	else:
		print(9)
		exit()
import math
u = abs(u)
u = u // 9
m = u // n
p = u % n
if p == 0:
	q = 10 ** (n - 1) + m - 1
	o = q % 10
else:
	q = 10 ** (n - 1) + m
	o = q // 10 ** (n - p) % 10
print(o)


lists = list((str(i) for i in range(1, 10001)))
lists = ''.join(lists)
n = int(input())
print(lists[n - 1])


s = ''
for i in range(10000):
	s += str(i)
ind = int(input())
print(s[ind])


n = int(input())
check = True
t = 0
tnext = 9
count = 1
i = 1
j = 1
res = 0
while check:
	if n <= tnext:
		res = n - t
		check = False
	else:
		count = count + 1
		if t != 0:
			t = t + 9 * i * j
		else:
			t = 9
		tnext = tnext + 9 * (i + 1) * (j * 10)
		i = i + 1
		j = j * 10
num1 = int(res / count)
num2 = res % count
des = pow(10, count - 1)
despac = des + num1
if num2 == 0:
	despac = str(despac - 1)
	print(despac[-1])
else:
	despac = str(despac)
	print(despac[num2 - 1])


n = int(input())
st = ''
le = 0
for i in range(1, 100000 + 1):
	st += str(i)
	le += len(str(i))
	if le >= n:
		break
j = le - n
print(st[-j - 1])


k = int(input(''))
ch = ''
for i in range(1, k + 1):
	ch += str(i)
print(ch[k - 1])


l = []
for i in range(1, 10000):
	l.append(str(i))
n = int(input())
s = ''.join(l)
print(s[n - 1])


k = int(input())
rs = ''
for i in range(1, k + 1, 1):
	tmp = str(i)
	rs += tmp
print(rs[k - 1])


k = int(input())
i = 0
while k > 0:
	i += 1
	k -= len(str(i))
i = str(i)
print(i[len(i) - 1 + k])


ST = ''
for i in range(1, 10001):
	ST += str(i)
print(ST[int(input()) - 1])


n = int(input())
if n <= 9:
	print(n)
else:
	i = 0
	while (n - 9 * 10 ** i * (i + 1) > 0) & (i <= 11):
		n = n - 9 * 10 ** i * (i + 1)
		i = i + 1
	r = n % (i + 1)
	p = n // (i + 1)
	d = 10 ** i + p - 1
	if r != 0:
		d = d + 1
	ch = str(d)
	print(ch[r - 1])


s = input()
res = ''
for i in range(int(s) + 1):
	if len(res) <= int(s):
		res += str(i)
	else:
		break
print(res[int(s)])


n = int(input())
limit_int = limit = decimal = 9
count = 0
while True:
	count += 1
	if n <= limit:
		difference = limit - n
		position = difference % count
		difference = difference // count
		difference = decimal - difference
		print(''.join(list(reversed(str(difference))))[position])
		break
	else:
		decimal = int(str(limit_int) * (count + 1))
		limit += int(str(limit_int) + '0' * count) * (count + 1)


k = int(input())
s = ''
i = 1
while i <= k:
	s += str(i)
	i += 1
print(s[k - 1])


a = ''
i = 1
n = int(input())
while len(a) < 10000:
	a += str(i)
	i += 1
print(a[n - 1])


from sys import stdin, stdout
from collections import *
from math import gcd, floor, ceil

def st():
	return list(stdin.readline().strip())

def li():
	return list(map(int, stdin.readline().split()))

def mp():
	return map(int, stdin.readline().split())

def inp():
	return int(stdin.readline())

def pr(n):
	return stdout.write(str(n) + '\n')
mod = 1000000007
INF = float('inf')

def solve():
	n = inp() - 1
	pre = 0
	cur = 1
	point = 1
	while pre + 9 * cur * point < n:
		pre += 9 * cur * point
		cur *= 10
		point += 1
	n -= pre
	(num, pos) = divmod(n, point)
	num += pow(10, point - 1)
	pr(str(num)[pos])
for _ in range(1):
	solve()


t = int(input())
k = ''
for i in range(1, 10000 + 1):
	k = k + str(i)
print(k[t - 1])


k = int(input())
num_digits = 1
num_numbers = 9
k -= 1
while k > num_digits * num_numbers:
	k -= num_numbers * num_digits
	num_digits += 1
	num_numbers *= 10
number = 10 ** (num_digits - 1) + k // num_digits
index = k % num_digits
answer = str(number)[index]
print(answer)


import math

def countDigit(n):
	return math.floor(math.log(n, 10) + 1)
n = int(input())
count = countDigit(n)
if count == 1:
	print(n)
else:
	low = 1
	high = 9
	sum = []
	digit = 0
	sum.append(0)
	sum.append(9)
	for i in range(2, 16):
		low = low * 10
		high = high * 10 + 9
		sum.append((high - low + 1) * i + sum[i - 1])
		if n < sum[i]:
			digit = i
			break
	x = n - sum[digit - 1]
	q = x / digit
	r = x % digit
	low = math.pow(10, digit - 1)
	low = low + q - 1
	if r == 0:
		print(int(low % 10))
	else:
		n = low + 1
		stringnum = str(n)
		print(int(stringnum[r - 1]))


k = int(input())
print(''.join((str(t) for t in range(1, k + 1)))[k - 1])


k = int(input())
r = ''.join(list(map(str, range(1, k + 1))))
print(r[k - 1])


k = int(input())
c = 1
i = 0
s = ''
while True:
	s += str(c)
	if c < 10:
		i += 1
	elif c >= 10 and c < 100:
		i += 2
	elif c >= 100 and c < 1000:
		i += 3
	elif c >= 1000 and c < 10000:
		i += 4
	else:
		i += 5
	if i >= k:
		print(s[k - 1])
		break
	c += 1


k = int(input())
ans = []
for i in range(1, k + 1):
	for j in str(i):
		ans.append(int(j))
print(ans[k - 1])


k = int(input())
x = ''.join([str(i) for i in range(5000)])
print(x[k])


k = int(input())
mul = 1
d = 1
while k > mul * 9 * d:
	k -= mul * 9 * d
	d += 1
	mul *= 10
x = k % d
y = k // d
y += mul
if x == 0:
	print((y - 1) % 10)
else:
	y = y // pow(10, d - x)
	print(y % 10)


from math import pow
n = int(int(input()) - 1)
x = 1
y = 9
while n > x * y:
	n -= x * y
	x += 1
	y *= 10
a = int(pow(10, x - 1)) + int(n / x)
z = str(a)
which = n % x
print(z[which])


num = input()
num = int(num)
lst = []
i = 1
count = 0
index = -1
while count < num:
	strI = str(i)
	strI = list(strI)
	for n in range(0, len(strI)):
		lst.append(strI[n])
	if i >= 1000:
		count += 4
	elif i >= 100:
		count += 3
	elif i >= 10:
		count += 2
	else:
		count += 1
	i += 1
if count != num:
	diff = count - num
	index -= diff
ans = lst[index]
finalAns = ''.join(ans)
print(finalAns)


a = [i for i in range(0, 10001)]
for i in range(len(a)):
	a[i] = str(a[i])
a = ''.join(a)
k = int(input())
print(a[k])


strr = ''
a = 1
while len(strr) <= 10000:
	strr += str(a)
	a += 1
print(strr[int(input()) - 1])


print(''.join(map(str, range(3000)))[int(input())])


k = int(input())
c = 0
for i in range(1, 10000):
	s = str(i)
	c = c + len(s)
	if c >= k:
		break
	else:
		continue
b = str(i)
if c == k:
	print(b[len(b) - 1])
else:
	print(b[len(b) - (c - k) - 1])


import sys
k = int(input())
if type(k) != int or k <= 0 or k > pow(10, 12):
	print('wrong input. try again')
	sys.exit()
lim_init = lim = decimal = 9
c = 0
while True:
	c += 1
	if k <= lim:
		diff = lim - k
		pos = diff % c
		diff = int(diff / c)
		diff = decimal - diff
		print(''.join(list(reversed(str(diff))))[pos])
		break
	else:
		decimal = int(str(lim_init) * (c + 1))
		lim += int(str(lim_init) + '0' * c) * (c + 1)


t = ''
a = int(input())
for k in range(1, a + 5):
	if len(t) < a:
		t += str(k)
	else:
		print(t[a - 1])
		break


n = int(input())
a = '0'
for i in range(1, n + 1):
	a += str(i)
print(a[n])


k = int(input())
a = ''
i = 0
while True:
	a = a + str(i)
	i += 1
	if len(a) > k:
		break
print(a[k])


a = int(input())
i = 1
lst = []
j = 0
v = ''
while i <= 10001:
	lst.append(i)
	i = i + 1
while j < 10001:
	v = v + str(lst[j])
	j = j + 1
k = list(str(v))
print(int(k[a - 1]))


n = int(input())
if n <= 9:
	print(n)
	exit(0)
a = 9
b = 1
while True:
	if n > b * a:
		n = n - b * a
		a *= 10
		b += 1
	else:
		break
dig = 10 ** (b - 1)
q = (n - 1) // b
r = (n - 1) % b
num = dig + q
print(str(num)[r])


k = int(input())
test = ''
for i in range(1, k + 1):
	test = test + str(i)
print(test[k - 1])


N = int(input())
terms = 1
n = 9
total = 0
while N > terms * n:
	N = N - terms * n
	total = total + n
	terms = terms + 1
	n = n * 10
print(str(total + (N + terms - 1) // terms)[(N - 1) % terms])


def totaller(i):
	if i == 0:
		return 0
	else:
		total1 = totaller(i - 1) + 9 * 10 ** (i - 1) * i
		return total1
no_of_digits = int(input())
j = 0
for i in range(1, 13):
	if no_of_digits >= totaller(i):
		j = i
kth_digit = (no_of_digits - totaller(j)) // (j + 1)
if (no_of_digits - totaller(j)) % (j + 1) != 0:
	answer = str(kth_digit + 10 ** j)
	print(answer[(no_of_digits - totaller(j)) % (j + 1) - 1])
else:
	answer = str(kth_digit + 10 ** j - 1)
	print(answer[(no_of_digits - totaller(j)) % (j + 1) - 1])


k = int(input())
if k <= 9:
	print(k)
elif k <= 189:
	k -= 9
	tem = int((k + 1) // 2) + 9
	if k % 2 == 0:
		print(int(tem % 10))
	elif k % 2 == 1:
		print(int(tem // 10))
elif k <= 2889:
	k -= 189
	tem = int((k + 2) // 3) + 99
	if k % 3 == 0:
		print(tem % 10)
	elif k % 3 == 1:
		print(int(tem / 100))
	elif k % 3 == 2:
		tem = int(tem / 10)
		print(tem % 10)
else:
	k -= 2889
	tem = int((k + 3) // 4) + 999
	if k % 4 == 0:
		print(tem % 10)
	elif k % 4 == 1:
		print(int(tem / 1000))
	elif k % 4 == 2:
		tem = int(tem / 100)
		print(tem % 10)
	elif k % 4 == 3:
		tem = int(tem / 10)
		print(tem % 10)


def f(x):
	(dig, cnt) = (1, 9)
	ans = 0
	while dig != len(str(x)):
		ans += dig * cnt
		dig += 1
		cnt *= 10
	ans += (x - cnt // 9 + 1) * dig
	return ans
k = int(input())
(l, r) = (1, 1000000000000)
if k == 1:
	print(1)
	return
while l < r:
	mid = l + r + 1 >> 1
	if f(mid) < k:
		l = mid
	else:
		r = mid - 1
k -= f(l)
l += 1
print(str(l)[k - 1])


n = int(input())
d_sep = ''.join(map(lambda v: str(v), range(1, 10001)))
print(d_sep[n - 1])


idx = {}
idx[0] = 0
s = 0
num = 9
for digit in range(1, 12):
	s += num * digit
	idx[digit] = s
	num = num * 10
N = int(input())
nubmer = 0
r = 0
d = 0
for digit in range(1, 12):
	if N <= idx[digit] and N > idx[digit - 1]:
		number = (N - idx[digit - 1]) // digit
		r = (N - idx[digit - 1]) % digit
		d = digit
		break
if r != 0:
	number += 1
num = 10 ** (d - 1) + number - 1
digit = [int(i) for i in str(num)]
if r == 0:
	print(digit[-1])
else:
	print(digit[r - 1])


string = ''
for i in range(1, 10001):
	string += str(i)
k = int(input())
print(string[k - 1])


s = ''
for i in range(1, 2778):
	s = s + str(i)
print(s[int(input()) - 1])


k = int(input())
(s, n) = ('', 1)
while len(s) < k:
	s += str(n)
	n += 1
print(s[k - 1])


from sys import stdin, setrecursionlimit, stdout
from collections import deque
from math import sqrt, floor, ceil, log, log2, log10, pi, gcd, sin, cos, asin
from heapq import heapify, heappop, heappush, heapreplace, heappushpop
from bisect import bisect_right, bisect_left

def ii():
	return int(stdin.readline())

def fi():
	return float(stdin.readline())

def mi():
	return map(int, stdin.readline().split())

def fmi():
	return map(float, stdin.readline().split())

def li():
	return list(mi())

def si():
	return stdin.readline().rstrip()

def lsi():
	return list(si())
mod = 1000000007
res = ['NO', 'YES']
aa = [9, 99, 999, 9999, 99999, 999999, 9999999, 99999999, 999999999, 9999999999]
a = [9, 189, 2889, 38889, 488889, 5888889, 68888889, 788888889, 8888888889, 98888888889, 1088888888889]
test = 1
test_case = 1
while test <= test_case:
	test += 1
	n = ii()
	if n in a:
		n = 9
	if n < 10:
		print(n)
		exit()
	x = 1
	while a[x] < n:
		x += 1
	v = n - a[x - 1]
	z = v // (x + 1)
	z += aa[x - 1]
	v %= x + 1
	if not v:
		p = z % 10
	else:
		z += 1
		p = int(str(z)[v - 1])
	print(p)


n = int(input())
st = ''
for i in range(1, n + 1):
	st += str(i)
print(st[n - 1])


n = int(input())
l = ''
for i in range(1, n + 1):
	l += str(i)
print(l[n - 1])


import sys, collections
pat = ''
for i in range(1, 10001):
	pat += str(i)
print(pat[int(sys.stdin.readline()) - 1])


digit = 1
x = int(input())
start_range = 1
end_range = 9
nine = 9
total = 0
while x > end_range:
	start_range = end_range + 1
	digit += 1
	end_range += digit * nine * pow(10, digit - 1)
	total = total + start_range
start = pow(10, digit - 1)
number = int((x - start_range) / digit)
index = int((x - start_range) % digit)
start = start + number
string = str(start)
print(string[index])


k = int(input())
nc = [0 for i in range(14)]
for i in range(1, 14):
	nc[i] += nc[i - 1] + 9 * 10 ** (i - 1) * i
for i in range(13):
	if nc[i] < k <= nc[i + 1]:
		cif = i + 1
if cif == 1:
	print(k)
	quit()
c = k - nc[cif - 1]
if c % cif == 0:
	nnr = c // cif
	ncif = cif
else:
	nnr = 1 + c // cif
	ncif = c % cif
number = nnr + 10 ** (cif - 1) - 1
while cif != ncif:
	number //= 10
	cif -= 1
print(number % 10)


(a, b, c, d, e, f, g, h, i, j, k, l) = [9 * 1, 90 * 2, 900 * 3, 9000 * 4, 90000 * 5, 900000 * 6, 9000000 * 7, 90000000 * 8, 900000000 * 9, 9000000000 * 10, 90000000000 * 11, 900000000000 * 12]
a = a
b = a + b
c = b + c
d = c + d
e = d + e
f = e + f
g = f + g
h = g + h
i = h + i
j = i + j
k = j + k
l = k + l
li1 = [0, a, b, c, d, e, f, g, h, i, j, k, l]
n = int(input())
nn = 0
for ii in range(1, 12):
	if li1[ii - 1] < n and li1[ii + 1] > n:
		nn = ii
n = n - li1[nn - 1]
r1 = 10 ** (nn - 1)
n1 = n // nn
r1 += n1 - 1
n2 = n - n1 * nn
if n2 == 0:
	print(str(r1)[-1])
else:
	print(str(r1 + 1)[n2 - 1])


k = int(input())
total = 0
for i in range(1, k + 1):
	total += len(str(i))
	if total >= k:
		break
req = total - k
print(str(i)[-1 - req])


a = ''
for i in range(1, 9999):
	a += str(i)
print(a[int(input()) - 1])


target = int(input())
b = ''
num = 0
while len(b) < target:
	num = num + 1
	b = b + str(num)
print(b[target - 1])


n = int(input())
if n < 10:
	print(n)
else:
	l = [str(x) for x in range(1, n + 1)]
	string = ''.join(l)
	print(string[n - 1])


n = int(input())
i = 1
s = 0
while i * 9 * 10 ** (i - 1) < n - s:
	s += i * 10 ** (i - 1) * 9
	i += 1
n -= s
j = n // i
k = n % i
if k is 0:
	ind = i - 1
else:
	ind = k - 1
print(str(10 ** (i - 1) + j - 1 + (k > 0))[ind])


def n_to_array(number):
	str_number = str(number)
	arr_number = []
	for digit in str_number:
		arr_number.append(int(digit))
	return arr_number

def n_digits(number):
	if number == 0:
		return 1
	n = 0
	while number > 0:
		n += 1
		number = number // 10
	return n

def _1177A(k):
	if k < 10:
		print(k)
		return
	k -= 9
	a = 10
	b = 99
	while (b - a + 1) * n_digits(a) < k:
		k -= (b - a + 1) * n_digits(a)
		a *= 10
		b *= 10
		b += 9
	nr = a + (k + n_digits(a) - 1) // n_digits(a) - 1
	ord = (k - 1) % n_digits(a)
	print(n_to_array(nr)[ord])
_1177A(int(input()))


X = ''
N = int(input())
for i in range(1, N + 1):
	X += str(i)
print(X[N - 1])


(cnt, s) = (1, '')
while len(s) < 10000:
	(cnt, s) = (cnt + 1, s + str(cnt))
print(s[int(input()) - 1])


n = int(input())
s = ''
i = 0
while len(s) <= n:
	s += str(i)
	i += 1
print(s[n])


from math import floor
from sys import stdin
CONST = 9

def solve(k):
	i = 0
	while k > CONST * 10 ** i * (i + 1):
		k -= floor(CONST * 10 ** i) * (i + 1)
		i += 1
	num_digits = i + 1
	num = floor((k - 1) / num_digits)
	num += floor(10 ** i)
	print('{}'.format(num)[(k - 1) % num_digits])
for line in stdin:
	solve(int(line.rstrip()))


k = int(input())
count = 1
number = 1
result = 0
number1 = 1
while True:
	if number == 1:
		if result + 9 < k:
			result += 9
			number = 20
			number1 = 10
		else:
			break
	elif number == 20:
		if result + 180 < k:
			result += 180
			number += 10
			number1 = 100
		else:
			break
	elif result + 9 * number * 10 ** count < k:
		result += 9 * number * 10 ** count
		number += 10
		count += 1
		number1 *= 10
	else:
		break
while True:
	if count == 0:
		break
	if result + number * 10 ** count < k:
		result += number * 10 ** count
		number1 += 100 * 10 ** (count - 1)
	else:
		count -= 1
while True:
	if number == 1:
		break
	if result + number < k:
		result += number
		number1 += 10
	else:
		break
while True:
	if result + len(str(number1)) >= k:
		print(str(number1)[k - result - 1])
		break
	else:
		number1 += 1
		result += len(str(number1))


import math
k = int(input())
s = ''
i = 1
while len(s) < k:
	s += str(i)
	i += 1
print(s[k - 1])


k = int(input()) - 1
w = 1
p = 9
while k >= w * p:
	k -= w * p
	w += 1
	p *= 10
x = p // 9 + k // w
print(str(x)[k % w])


k = int(input())
p = ''
for i in range(3500):
	p += str(i)
print(p[k])


import sys, math, queue, bisect
MOD = 998244353
sys.setrecursionlimit(1000000)
n = int(input())
if n < 10:
	print(n)
	exit()
d = 1
while n > 9 * d * pow(10, d - 1):
	n -= 9 * d * pow(10, d - 1)
	d += 1
x = pow(10, d - 1) + (n - 1) // d
p = n % d
x = str(x).zfill(d)
print(x[p - 1])


k = int(input())
s = 0
i = 1
while s + i * (9 * pow(10, i - 1)) < k:
	s += i * (9 * pow(10, i - 1))
	i += 1
else:
	i -= 1
k = k - s - 1
x = k // (i + 1)
y = k % (i + 1)
x = pow(10, i) + x
ss = str(x)
print(ss[y])


A = [9, 189, 2889, 38889, 488889, 5888889, 68888889, 788888889, 8888888889, 98888888889, 1088888888889]
k = int(input())
if k < 10:
	print(k)
else:
	for n in range(0, 12):
		if k > A[n + 1]:
			continue
		else:
			a = 10 ** (n + 1) + (k - A[n] - 1) // (n + 2)
			b = (k - A[n] - 1) % (n + 2)
			print(str(a)[b])
			break


n = ''
for i in range(1, 100001, 1):
	n += str(i)
k = int(input())
print(n[k - 1])


k = int(input())
s = ''
id = 1
while len(s) < k:
	s += str(id)
	id += 1
print(s[k - 1])


c = [*range(1, int(input()) + 1)]
b = ''
d = c[-1]
while c and len(b) < c[-1]:
	b = b + str(c.pop(0))
print(int(b[d - 1]))


import sys
import math
get_string = lambda : sys.stdin.readline().strip()
get_int_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
get_int = lambda : int(sys.stdin.readline())
pt = lambda x: sys.stdout.write(str(x) + '\n')
n = get_int()
end = 0
digit = 0
while True:
	digit += 1
	a = 10 ** (digit - 1)
	b = int('9' * digit)
	start = end + 1
	end = end + (b - a + 1) * digit
	if n <= end:
		break
rem = (n - start + 1) % digit
seq = (n - start + 1) // digit
if rem != 0:
	x = 1
else:
	x = 0
term = str(a + (seq + x - 1))
print(term[rem - 1])


l = []
n = []
sum = 0
multiply = 9
for i in range(1, 12):
	s = '9' * i
	n.append(int(s))
	sum += i * multiply
	multiply *= 10
	l.append(sum)
k = int(input())
if k < 9:
	print(k)
else:
	t = 0
	for i in range(len(l)):
		if k < l[i]:
			t = i
			break
	temp = k - l[t - 1]
	offset = temp % (t + 1)
	value = temp // (t + 1)
	number = n[t - 1] + value
	if offset == 0:
		print(number % 10)
	else:
		number += 1
		offset -= 1
		print(str(number)[offset])


mystring = ''
for num in range(1, 10000):
	mystring = mystring + str(num)
k = int(input())
print(mystring[k - 1])


i = 1
seq = ''
for i in range(10000):
	seq += str(i)
x = int(input())
print(seq[x])


paramaterK = int(input())
(count, digitString) = (0, '')
while count <= paramaterK:
	digitString += str(count)
	count = count + 1
print(digitString[paramaterK])


a = int(input())
i = 1
amount = a
while amount > i * (10 ** i - 10 ** (i - 1)):
	amount = amount - i * (10 ** i - 10 ** (i - 1))
	i = i + 1
x = amount // i
y = amount % i
if y == 0:
	if i == 1:
		print(x % 10)
	else:
		print((10 ** (i - 1) + x - 1) % 10)
elif i == 1:
	print(x % 10)
else:
	print((10 ** (i - 1) + x) // 10 ** (i - y) % 10)


import sys
import math
import collections
input = sys.stdin.readline
l = [str(i) for i in range(1, 100001)]
k = int(input())
i = 0
j = 0
while i < k:
	if i + len(l[j]) < k:
		i += len(l[j])
		j += 1
	else:
		for z in range(len(l[j])):
			if i + z + 1 == k:
				print(l[j][z])
				i = k
				break


ll = lambda : list(map(int, input().split()))
testcases = 1
for testcase in range(testcases):
	[k] = ll()
	s = ''
	for i in range(1, 5000):
		s += str(i)
	print(s[k - 1])


n = int(input())
a = ''
i = 0
while len(a) < n:
	i += 1
	a += str(i)
print(a[n - 1])


s = ''
for i in range(1, 100000000):
	s += str(i)
	if len(s) >= 11000:
		break
print(s[int(input()) - 1])


st = ''
for i in range(1, pow(10, 4) + 1):
	st = st + str(i)
k = int(input())
print(st[k - 1])


k = int(input())
int_list = [*range(1, k + 1)]
for num in range(k):
	int_list[num] = str(int_list[num])
final_list = ''.join(int_list)
print(final_list[k - 1])


def f(x):
	ret = 0
	while x > 0:
		ret += 1
		x = x // 10
	return ret
n = int(input())
id = 0
for i in range(1, 10000):
	if n - f(i) > 0:
		n -= f(i)
	elif n - f(i) == 0:
		n -= f(i)
		id = i
		break
	else:
		id = i
		break
s = str(id)
print(s[n - 1])


k = int(input())
l = [str(i) for i in range(1, k + 1)]
s = ''.join(l)
print(s[k - 1])


k = int(input(''))
sol = ''
cnt = 0
for i in range(1, 13):
	inc = 9 * 10 ** (i - 1) * i
	if cnt + inc >= k:
		break
	else:
		cnt += inc
lft = k - cnt
dig = lft / i
if dig != int(dig):
	dig = int(dig + 1)
else:
	dig = int(dig)
num = 10 ** (i - 1) + dig - 1
left = k - (cnt + dig * i)
sol = str(num)
print(sol[left - 1])


k = input()
k = int(k)
n = 1
while k - n * 9 * 10 ** (n - 1) > 0:
	k = k - n * 9 * 10 ** (n - 1)
	n = n + 1
n = n - 1
if n == 0:
	print(k)
else:
	nth_num = (k - 1) // (n + 1) + 1
	num = 10 ** n + nth_num - 1
	pos = (k - 1) % (n + 1)
	print(int(str(num)[pos]))


t = int(input())
s = ''
for x in range(1, 10001):
	s = s + str(x)
print(s[t - 1])


S = ''
index = 1
while len(S) < 10000:
	S = S + str(index)
	index += 1
print(S[int(input()) - 1])


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
from bisect import bisect_left as bsl

def main():
	cur = 9
	count = 1
	tot = 0
	num = []
	cc = []
	for s in range(11):
		num.append(cur * count)
		tot += cur
		cc.append(tot)
		cur *= 10
		count += 1
	ans = [num[0]]
	for s in range(1, 11):
		ans.append(ans[-1] + num[s])
	k = int(input())
	ind = min(bsl(ans, k), 10)
	left = k
	if ind > 0:
		left -= ans[ind - 1]
	nums = left // (ind + 1)
	rem = left % (ind + 1)
	if left % (ind + 1) != 0:
		nums += 1
	if ind > 0:
		nums += cc[ind - 1]
	answer = [int(k) for k in str(nums)]
	print(answer[rem - 1])
main()


k = int(input())
if k <= 9:
	print(k)
else:
	s = 9
	n = 1
	while s < k:
		n += 1
		prev_s = s
		s += (10 ** n - 10 ** (n - 1)) * n
	digit_pos = k - (prev_s + 1)
	number = 10 ** (n - 1) + digit_pos // n
	if digit_pos / n != digit_pos // n:
		digit_pos = digit_pos - digit_pos // n * n
	else:
		digit_pos = 0
	print(str(number)[digit_pos])


from math import *

def digitcount(n):
	d = 0
	while True:
		if pow(10, d) <= n < pow(10, d + 1):
			return d + 1
		else:
			d = d + 1

def nth_digit(n):
	digitsum = 0
	i = 1
	while True:
		digitsum += len(str(i))
		if digitsum >= n:
			return int(str(i)[-1 - digitsum + n])
		else:
			i += 1
n1 = input()
n = int(n1)
print(nth_digit(n))


k = int(input())
a = []
for i in range(5000):
	for j in range(len(str(i))):
		a.append(str(i)[j])
a = list(a)
print(a[k])


(k, s) = (int(input()), str())
for i in range(1, k + 1):
	s = s + str(i)
for i in range(0, len(s)):
	if i + 1 == k:
		print(s[i])


from math import ceil
n = int(input())
if n <= 9:
	print(n)
elif n <= 189:
	v = ceil((n - 9) / 2) + 9
	print(str(v)[(n - 10) % 2])
elif n <= 2889:
	v = ceil((n - 189) / 3) + 99
	print(str(v)[(n - 190) % 3])
else:
	v = ceil((n - 2889) / 4) + 999
	print(str(v)[(n - 2890) % 4])


n = int(input())
x = 1
while n != 0:
	for i in range(len(str(x))):
		if n != 0:
			s = str(x)[i]
			n -= 1
	x += 1
print(s)


st = '0'
n = int(input(''))
i = 0
j = 1
while i < n:
	st += str(j)
	i += 1
	j += 1
print(st[n])


k = int(input())
lis = ''.join([str(i) for i in range(1, k + 1)])
print(lis[k - 1])


n = int(input())
l = [i for i in range(1, n + 1)]
s = ''.join((str(x) for x in l))
print(s[n - 1])


from __future__ import division, print_function
import os, sys
from io import BytesIO, IOBase
if sys.version_info[0] < 3:
	from __builtin__ import xrange as range
	from future_builtins import ascii, filter, hex, map, oct, zip

def ii():
	return int(input())

def si():
	return input()

def mi():
	return map(int, input().strip().split(' '))

def msi():
	return map(str, input().strip().split(' '))

def li():
	return list(mi())

def dmain():
	sys.setrecursionlimit(1000000)
	threading.stack_size(1024000)
	thread = threading.Thread(target=main)
	thread.start()
import sys
input = sys.stdin.readline
scanner = lambda : int(input())
string = lambda : input().rstrip()
get_list = lambda : list(read())
read = lambda : map(int, input().split())
get_float = lambda : map(float, input().split())

def ceil(x):
	if x != int(x):
		x = int(x) + 1
	return x

def factorial(x, m):
	val = 1
	while x > 0:
		val = val * x % m
		x -= 1
	return val

def fact(x):
	val = 1
	while x > 0:
		val *= x
		x -= 1
	return val

def swaparr(arr, a, b):
	temp = arr[a]
	arr[a] = arr[b]
	arr[b] = temp

def gcd(a, b):
	if b == 0:
		return a
	return gcd(b, a % b)

def lcm(a, b):
	return a * b // math.gcd(a, b)

def is_integer(n):
	return math.ceil(n) == math.floor(n)

def nCr(n, k):
	if k > n:
		return 0
	if k > n - k:
		k = n - k
	res = 1
	for i in range(k):
		res = res * (n - i)
		res = res / (i + 1)
	return int(res) % MOD

def comb(n, x):
	(a, b) = (1, 1)
	for i in range(1, x + 1):
		a *= n + 1 - i
		b *= i
	return a // b % MOD

def primefs(n):
	primes = {}
	while n % 2 == 0 and n > 0:
		primes[2] = primes.get(2, 0) + 1
		n = n // 2
	for i in range(3, int(n ** 0.5) + 2, 2):
		while n % i == 0 and n > 0:
			primes[i] = primes.get(i, 0) + 1
			n = n // i
	if n > 2:
		primes[n] = primes.get(n, 0) + 1
	return primes

def power(x, y, p):
	if y == 0:
		return 1
	res = 1
	x = x % p
	if x == 0:
		return 0
	while y > 0:
		if y & 1 == 1:
			res = res * x % p
		y = y >> 1
		x = x * x % p
	return res

def swap(a, b):
	temp = a
	a = b
	b = temp
	return (a, b)

def find(x, link):
	p = x
	while p != link[p]:
		p = link[p]
	while x != p:
		nex = link[x]
		link[x] = p
		x = nex
	return p

def union(x, y, link, size):
	x = find(x, link)
	y = find(y, link)
	if size[x] < size[y]:
		(x, y) = swap(x, y)
	if x != y:
		size[x] += size[y]
		link[y] = x

def sieve(n):
	prime = [True for i in range(n + 1)]
	(prime[0], prime[1]) = (False, False)
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	return prime

def phi(n):
	result = n
	p = 2
	while p * p <= n:
		if n % p == 0:
			while n % p == 0:
				n = n // p
			result = result * (1.0 - 1.0 / float(p))
		p = p + 1
	if n > 1:
		result = result * (1.0 - 1.0 / float(n))
	return int(result)

def is_prime(n):
	if n == 0:
		return False
	if n == 1:
		return True
	for i in range(2, int(n ** (1 / 2)) + 1):
		if not n % i:
			return False
	return True

def next_prime(n, primes):
	while primes[n] != True:
		n += 1
	return n
MAXN = int(100000.0 + 5)

def spf_sieve():
	spf[1] = 1
	for i in range(2, MAXN):
		spf[i] = i
	for i in range(4, MAXN, 2):
		spf[i] = 2
	for i in range(3, ceil(MAXN ** 0.5), 2):
		if spf[i] == i:
			for j in range(i * i, MAXN, i):
				if spf[j] == j:
					spf[j] = i
spf = [0 for i in range(MAXN)]

def factoriazation(x):
	res = []
	for i in range(2, int(x ** 0.5) + 1):
		while x % i == 0:
			res.append(i)
			x //= i
	if x != 1:
		res.append(x)
	return res

def factors(n):
	res = []
	for i in range(1, int(n ** 0.5) + 1):
		if n % i == 0:
			res.append(i)
			res.append(n // i)
	return list(set(res))

def int_array():
	return list(map(int, input().strip().split()))

def float_array():
	return list(map(float, input().strip().split()))

def str_array():
	return input().strip().split()

def binary_search(low, high, w, h, n):
	while low < high:
		mid = low + (high - low) // 2
		if check(mid, w, h, n):
			low = mid + 1
		else:
			high = mid
	return low

def check(moves, n):
	val = (moves + 1) // 2
	rem = moves - val
	sol = (val + 1) * (rem + 1)
	return sol < n

def sortSecond(val):
	return val[1]
MOD = int(1000000000.0) + 7
CMOD = 998244353
INF = float('inf')
NINF = -float('inf')
small = 'abcdefghijklmnopqrstuvwxyz'
large = small.upper()
from itertools import permutations
import math
import bisect as bis
import random
import sys
import collections as collect
import functools as fnt
from decimal import Decimal

def solve():
	k = scanner()
	s = ''
	for i in range(1, 10001):
		s = s + str(i)
	print(s[k - 1])
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')

def print(*args, **kwargs):
	(sep, file) = (kwargs.pop('sep', ' '), kwargs.pop('file', sys.stdout))
	at_start = True
	for x in args:
		if not at_start:
			file.write(sep)
		file.write(str(x))
		at_start = False
	file.write(kwargs.pop('end', '\n'))
	if kwargs.pop('flush', False):
		file.flush()
if sys.version_info[0] < 3:
	(sys.stdin, sys.stdout) = (FastIO(sys.stdin), FastIO(sys.stdout))
else:
	(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
t = 1
for i in range(t):
	solve()


k = int(input(''))
sol = ''
cnt = 0
for i in range(1, 10000):
	sol += str(i)
	cnt += len(str(i))
	if cnt >= k:
		break
print(int(sol[k - 1]))


k = int(input())
number = 1
main_number = ''
while len(main_number) + len(str(number)) < k:
	main_number += str(number)
	number += 1
print(str(number)[k - len(main_number) - 1])


number = int(input())
count = 0
while number - len(str(count + 1)) >= 0:
	number -= len(str(count + 1))
	count += 1
if number == 0:
	count = str(count)
	print(count[-1])
else:
	count += 1
	count = str(count)
	print(count[number - 1])


a = int(input())
st = ''
for i in range(1, a + 2):
	st += str(i)
	if len(st) > a:
		break
print(st[a - 1])


num = int(input())
string = ''
result = 0
if num <= 9:
	print(str(num))
else:
	for i in range(1, num + 1):
		string += str(i)
	print(string[num - 1])


k = int(input())
prev = 0
nextt = 0
NumofDigits = 0
while True:
	prev = nextt
	nextt = nextt + 9 * 10 ** (NumofDigits - 1) * NumofDigits
	if k >= prev and k <= nextt:
		break
	NumofDigits = NumofDigits + 1
if NumofDigits == 1:
	print(k)
else:
	result = 10 ** (NumofDigits - 1) + int((k - (prev + 1)) / NumofDigits)
	i = 0
	while True:
		if (k - int(prev + 1)) % NumofDigits == i:
			break
		i = i + 1
	result = str(result)
	print(result[i])


s = ''
for i in range(1, 10 ** 4 + 1):
	s += str(i)
print(s[int(input()) - 1])


k = int(input())
s = ''
st = 1
while len(s) <= k + 2:
	s += str(st)
	st += 1
print(s[k - 1])


list1 = []
for i in range(10001):
	list1.append(str(i))
str1 = ''.join(list1)
print(str1[int(input())])


k = int(input())
if k < 10:
	print(k)
	quit()
c = 0
n = k
a = k
while n > 0:
	c += 1
	sub = 10 ** c - 10 ** (c - 1)
	a -= sub * c
	n = a / (c + 1) + (10 ** c - 1)
	if n + 1 <= 10 ** (c + 1):
		if int(n) == n:
			print(int(n % 10))
			exit()
		else:
			print(str(int(n) + 1)[round((n - int(n)) * (c + 1)) - 1])
			exit()


k = int(input())
print(''.join(map(str, range(1, k + 1)))[k - 1])


def lint(n):
	h = int(n)
	i = 0
	while h > 0:
		h = int(h / 10)
		i = i + 1
	len = i
	return len
k = int(input())
list = [1]
n = 1
y = 1
for y in range(1, k):
	n = n + 1
	p = lint(n)
	for i in range(p, 0, -1):
		e = 10 ** (i - 1)
		x = int(n / e)
		z = x % 10
		list.append(z)
	y = y + p
print(list[k - 1])


k = int(input())
String = ''
c = 0
for i in range(0, k):
	c += 1
	String += str(c)
print(String[k - 1])


import sys
n = int(input())
ind = 0
dig = 0
for i in range(1, 12):
	dig += i * 10 ** (i - 1) * 9
	if dig > n:
		ind = i - 1
		rt = dig - i * 10 ** (i - 1) * 9
		break
n -= rt
no = 10 ** ind
if n == 0:
	print(9)
	sys.exit()
u = n
n -= n // (ind + 1) * (ind + 1)
no += max(0, u // (ind + 1) - 1)
if n == 0:
	print(str(no)[-1])
else:
	no += 1
while n > 0:
	if n <= ind + 1:
		e = str(no)
		print(e[n - 1])
	n -= ind + 1
	no += 1


s = ''
for x in range(1, 10000):
	s += str(x)
k = int(input())
print(s[k - 1])


k = int(input())
for i in range(1, 26700):
	s = str(i)
	if k > len(s):
		k -= len(s)
	elif k == len(s):
		print(s[-1])
		break
	else:
		print(s[k - 1])
		break


from math import log
k = int(input())
r = k
l = 1
t = log(10)
while 1:
	m = (l + r) // 2
	x = int(log(m) / t)
	d = (1 - 10 ** (x + 1)) // 9 + (m + 1) * (x + 1)
	if 0 <= k - d <= 13:
		break
	elif d > k:
		r = m - 1
	else:
		l = m + 1
if m == 1000:
	d += 1
if d == k:
	print(str(m)[-1])
	exit()
st = ''
v = k - d
m += 1
for i in range(13):
	st += str(m)
	m += 1
print(st[v - 1])


k = int(input())
st = ''
for i in range(1, 5000):
	st = st + str(i)
print(st[k - 1])


n = int(input())
print(''.join(map(str, range(n + 1)))[n])


p = list(map(str, list(range(1, 10000))))
q = ''.join(p)
k = int(input())
print(q[k - 1])


n = int(input())
ans = ''
for i in range(n):
	ans += str(i + 1)
print(ans[n - 1])


from sys import stdin
import math
from collections import defaultdict
I = stdin.readline
s = []
for i in range(1, 10000):
	s.append(str(i))
s = ''.join(s)
n = int(I())
print(s[n - 1])


digit = int(input())
if int(digit) <= 9:
	print(digit)
	exit()
start_range = 1
end_range = 9
power = 1
digit_count = 2
while not (start_range <= digit and digit <= end_range):
	start_range = end_range + 1
	end_range = 9 * 10 ** power * digit_count + start_range - 1
	power += 1
	digit_count += 1
offset_number = (digit - start_range) // (digit_count - 1)
number = str(10 ** (power - 1) + offset_number)
offset_digit = (digit - start_range) % (digit_count - 1)
print(f'{number[offset_digit]}')


k = int(input())
res = ''
for i in range(1, 3000):
	res += str(i)
	if len(res) >= k:
		print(res[k - 1])
		exit(0)


n = int(input())
seq = ''.join([str(i) for i in range(0, 10001)])
print(seq[n])


s = 0
t = 0
c = 0
k = int(input())
while s < k:
	te = s
	temp = t
	t = t + 9 * pow(10, c)
	s = s + 9 * pow(10, c) * (c + 1)
	c = c + 1
a = (k - te) // c
re = (k - te) % c
if re == 0:
	a = a + temp
	a = str(a)
	print(a[-1])
else:
	a = a + temp + 1
	a = str(a)
	print(a[re - 1])


s = ''.join(list(map(str, [i for i in range(1, 10001)])))
k = int(input())
print(s[k - 1])


n = int(input())

def exp_(i):
	return (9 * pow(10, i) * i - 10 ** i + 1) // 9
i = 0
while True:
	v = exp_(i)
	if v >= n:
		break
	i = i + 1
if n == v:
	print('9')
else:
	n = n - exp_(i - 1)
	num = 10 ** (i - 1) - 1
	num = num + n // i
	r = n % i
	if r > 0:
		num = num + 1
		f = str(num)
		print(f[r - 1])
	else:
		t = str(num)
		print(t[-1])


mod = 1000000007
ii = lambda : int(input())
si = lambda : input()
dgl = lambda : list(map(int, input()))
f = lambda : map(int, input().split())
il = lambda : list(map(int, input().split()))
ls = lambda : list(input())
n = ii()
s = ''
for i in range(1, 5001):
	s += str(i)
print(s[n - 1])


import math
k = int(input())
s = 0
i = 0
while s < k:
	s = s + 9 * 10 ** i * (i + 1)
	i = i + 1
if k < 10:
	print(k)
else:
	k = k - s + 9 * 10 ** (i - 1) * i
	a = int(math.floor((k - 1) / i))
	a = a + 10 ** (i - 1)
	l = list(str(a))
	r = int((k - 1) % i)
	a = int(l[r])
	print(a)


T = (0, 9, 189, 2889, 38889, 488889, 5888889, 68888889, 788888889, 8888888889, 98888888889, 1088888888889)
k = int(input())
a = 0
for i in T:
	if i - k > 0:
		a = T.index(i)
		break
temp = T[a] - k
x = temp % a
res = 10 ** a - 1 - int(temp / a)
ans = int(res % 10 ** (x + 1) / 10 ** x)
print(ans)


n = int(input())
s = ''
counter = 1
while len(s) < n:
	s = s + str(counter)
	counter += 1
print(s[n - 1])


x = ''
cnt = 1
while True:
	x += str(cnt)
	cnt += 1
	if len(x) > 20000:
		break
n = int(input())
print(x[n - 1])


import sys
import math
import bisect

def main():
	val = 0
	A = []
	for i in range(1, 10000 + 1):
		s = str(i)
		A.append(s)
		val += len(s)
		if val >= 10000:
			break
	s = ''.join(list((str(a) for a in A)))
	n = int(input())
	print(s[n - 1])
main()


k = int(input())
for i in range(20):
	if k > 10 ** i * 9 * (i + 1):
		k -= 10 ** i * 9 * (i + 1)
	else:
		(a, b) = ((k - 1) // (i + 1) + 10 ** i, (k - 1) % (i + 1))
		print(str(a)[b])
		break


x = int(input())
c = ''
for i in range(1, 5000):
	c += str(i)
print(c[x - 1])


N = int(input())
a = ''
for i in range(1, N + 1):
	a += str(i)
print(a[N - 1])


k = int(input())
ch = 0
i = 0
r = 1
while k > r - 1:
	r += 9 * (i + 1) * 10 ** i
	i += 1
r -= 9 * i * 10 ** (i - 1)
print(str((k - r) // i + 10 ** (i - 1))[(k - r) % i])


def main_function():
	counter = int(input())
	my_counter = 0
	i = 0
	while True:
		i += 1
		my_counter += len(str(i))
		if my_counter >= counter:
			dif = my_counter - counter
			print(str(i)[-1 - dif])
			break
main_function()


n = int(input())
counter = 0
cur_number = 0
cur_array = list()
while counter < n:
	cur_number += 1
	cur = cur_number
	result = 0
	cur_array = list()
	while cur > 0:
		cur_array.append(cur % 10)
		cur //= 10
	cur_array.reverse()
	for i in cur_array:
		result = i
		counter += 1
		if counter == n:
			break
print(result)


L = [(i + 1) * 9 * 10 ** i for i in range(12)]
number = int(input())
exponent = 0
while number >= 0:
	number -= L[exponent]
	exponent += 1
exponent -= 1
number %= L[exponent]
start = 10 ** exponent
numDigits = exponent + 1
final = start + (number // numDigits - 1)
remainder = number % numDigits
if remainder == 0:
	final = str(final)
	print(final[-1])
else:
	final = str(final + 1)
	print(final[remainder - 1])


string = ''
search = int(input())
i = 1
while len(string) <= search:
	string += str(i)
	i = i + 1
print(string[search - 1:search])


n = int(input())
i = 1
stri = ''
while i <= n:
	stri += str(i)
	i += 1
print(stri[n - 1])


k = int(input())
if k <= 9:
	print(k)
else:
	length = len(str(k))
	s = ''
	num = 0
	for i in range(length - 1):
		num += 9 * 10 ** i * (i + 1)
		temp = num + 9 * 10 ** (i + 1) * (i + 2)
		if temp > k:
			length = i + 2
			break
	for i in range(length - 1):
		s = s + '1'
	previous_value = 9 * int(s)
	try_value = k - num
	if try_value % length == 0:
		div_value = try_value // length
		temp_string = str(previous_value + div_value)
		print(temp_string[len(temp_string) - 1])
	else:
		div_value = try_value // length + 1
		temp_string = str(previous_value + div_value)
		differ = div_value * length - try_value
		print(temp_string[len(temp_string) - differ - 1])


import bisect
xyz = [9, 90, 900, 9000, 90000, 900000, 9000000, 90000000, 900000000, 9000000000, 900000000000]
xzy = [10, 190, 2890, 38890, 488890, 5888890, 68888890, 788888890, 8888888890, 98888888890, 1088888888890, 11888888888890]
count = 2
k = int(input())
digits = bisect.bisect_left(xzy, k)
if k == 10:
	print(1)
elif k > 10:
	apu = k - xzy[digits - 1]
	modulo = apu % (digits + 1)
	dlj = apu // (digits + 1)
	output = 10 ** digits + dlj
	list1 = [i for i in str(output)]
	print(list1[modulo])
else:
	print(k)


import math
n = int(input())
a = [9]
for i in range(2, 20):
	a.append(10 ** i - 10 ** (i - 1))
b = [0]
for i in range(1, 20):
	b.append(b[-1] + i * a[i - 1])
for i in range(20):
	if n <= b[i]:
		break
p = b[i - 1]
k = n - p
ans = 10 ** (i - 1) - 1 + math.ceil(k / i)
if k % i == 0:
	print(('0' + str(ans))[i])
else:
	print(('0' + str(ans))[k % i])


from math import ceil
n = int(input())
if n <= 9:
	print(n)
else:
	d = 2
	ov = 9
	while n > d * 9 * 10 ** (d - 1) + ov:
		ov = d * 9 * 10 ** (d - 1) + ov
		d += 1
	v = ceil((n - ov) / d) + int('9' * (d - 1))
	print(str(v)[(n - ov - 1) % d])


def decimal2Str(a: int):
	x = list()
	while a > 0:
		x = [str(a % 10)] + x
		a = int(a / 10)
	return x
k = int(input())
(index, adddigit) = (1, 1)
ans = []
tmp = k
while tmp >= adddigit:
	ans = ans + decimal2Str(index)
	index += 1
	tmp -= adddigit
	if index >= 10 ** adddigit:
		adddigit += 1
ln = len(ans) + tmp
if tmp > 0:
	ans = ans + decimal2Str(index)
print(ans[ln - 1])


k = int(input())
k -= 1
(pow_10, length) = (1, 1)
while 9 * pow_10 * length < k:
	k -= 9 * pow_10 * length
	pow_10 *= 10
	length += 1
div = k / length
rem = k % length
num = pow_10 + div
print(str(num)[rem])


k = int(input())
l = []
for i in range(10000):
	l.append(str(i))
l = ''.join(l)
print(l[k])


pre_cal_sum_dec = {}

def sum_dec(n):
	global pre_cal_sum_dec
	try:
		return pre_cal_sum_dec[n]
	except:
		sumer = 0
		for i in range(1, n):
			sumer += 10 ** i
		pre_cal_sum_dec[n] = sumer
		return sumer

def find_head(digits):
	if digits < 1:
		return 0
	elif digits == 1:
		return 1
	else:
		return (digits - 1) * 10 ** (digits - 1) - sum_dec(digits - 1)

def cutter(start, end):
	listo = [0 for _ in range(10)]
	part = (end - start) // 9
	listo[0] = start
	for each in range(1, 10):
		start += part
		listo[each] = start
	return listo

def finder(number):
	(x, i) = (0, 0)
	if number == 1:
		return 1
	while x < number:
		bef = x
		x = find_head(i)
		i += 1
	if x == number:
		return 1
	e = i - 2
	number = number - bef
	interval = e * 10 ** (e - 1)
	col = number % e
	if col == 0:
		return (number // interval + 1) % 10
	return number // (e * 10 ** (e - 1 - col)) % 10
print(finder(int(input())))


n = int(input())
s = ''
for x in range(10000):
	s += str(x)
print(s[n])


s = '12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927292829292930293129322933293429352936293729382939294029412942294329442945294629472948294929502951295229532954295529562957295829592960296129622963296429652966296729682969297029712972297329742975297629772978297929802981298229832984298529862987298829892990299129922993299429952996299729982999300030013002300330043005300630073008300930103011301230133014301530163017301830193020302130223023302430253026302730283029303030313032303330343035303630373038303930403041304230433044304530463047304830493050305130523053305430553056305730583059306030613062306330643065306630673068306930703071307230733074307530763077307830793080308130823083308430853086308730883089309030913092309330943095309630973098309931003101310231033104310531063107310831093110311131123113311431153116311731183119312031213122312331243125312631273128312931303131313231333134313531363137313831393140314131423143314431453146314731483149315031513152315331543155315631573158315931603161316231633164316531663167316831693170317131723173317431753176317731783179318031813182318331843185318631873188318931903191319231933194319531963197319831993200320132023203320432053206320732083209321032113212321332143215321632173218321932203221322232233224322532263227322832293230323132323233323432353236323732383239324032413242324332443245324632473248324932503251325232533254325532563257325832593260326132623263326432653266326732683269327032713272327332743275327632773278327932803281328232833284328532863287328832893290329132923293329432953296329732983299330033013302330333043305330633073308330933103311331233133314331533163317331833193320332133223323332433253326332733283329333033313332333333343335333633373338333933403341334233433344334533463347334833493350335133523353335433553356335733583359336033613362336333643365336633673368336933703371337233733374337533763377337833793380338133823383338433853386338733883389339033913392339333943395339633973398339934003401340234033404340534063407340834093410341134123413341434153416341734183419342034213422342334243425342634273428342934303431343234333434343534363437343834393440344134423443344434453446344734483449345034513452345334543455345634573458345934603461346234633464346534663467346834693470347134723473347434753476347734783479348034813482348334843485348634873488348934903491349234933494349534963497349834993500350135023503350435053506350735083509351035113512351335143515351635173518351935203521352235233524352535263527352835293530353135323533353435353536353735383539354035413542354335443545354635473548354935503551355235533554355535563557355835593560356135623563356435653566356735683569357035713572357335743575357635773578357935803581358235833584358535863587358835893590359135923593359435953596359735983599360036013602360336043605360636073608360936103611361236133614361536163617361836193620362136223623362436253626362736283629363036313632363336343635363636373638363936403641364236433644364536463647364836493650365136523653365436553656365736583659366036613662366336643665366636673668366936703671367236733674367536763677367836793680368136823683368436853686368736883689369036913692369336943695369636973698369937003701370237033704370537063707370837093710371137123713371437153716371737183719372037213722372337243725372637273728372937303731373237333734373537363737373837393740374137423743374437453746374737483749375037513752375337543755375637573758375937603761376237633764376537663767376837693770377137723773377437753776377737783779378037813782378337843785378637873788378937903791379237933794379537963797379837993800380138023803380438053806380738083809381038113812381338143815381638173818381938203821382238233824382538263827382838293830383138323833383438353836383738383839384038413842384338443845384638473848384938503851385238533854385538563857385838593860386138623863386438653866386738683869387038713872387338743875387638773878387938803881388238833884388538863887388838893890389138923893389438953896389738983899390039013902390339043905390639073908390939103911391239133914391539163917391839193920392139223923392439253926392739283929393039313932393339343935393639373938393939403941394239433944394539463947394839493950395139523953395439553956395739583959396039613962396339643965396639673968396939703971397239733974397539763977397839793980398139823983398439853986398739883989399039913992399339943995399639973998399940004001400240034004400540064007400840094010401140124013401440154016401740184019402040214022402340244025402640274028402940304031403240334034403540364037403840394040404140424043404440454046404740484049405040514052405340544055405640574058405940604061406240634064406540664067406840694070407140724073407440754076407740784079408040814082408340844085408640874088408940904091409240934094409540964097409840994100410141024103410441054106410741084109411041114112411341144115411641174118411941204121412241234124412541264127412841294130413141324133413441354136413741384139414041414142414341444145414641474148414941504151415241534154415541564157415841594160416141624163416441654166416741684169417041714172417341744175417641774178417941804181418241834184418541864187418841894190419141924193419441954196419741984199420042014202420342044205420642074208420942104211421242134214421542164217421842194220422142224223422442254226422742284229423042314232423342344235423642374238423942404241424242434244424542464247424842494250425142524253425442554256425742584259426042614262426342644265426642674268426942704271427242734274427542764277427842794280428142824283428442854286428742884289429042914292429342944295429642974298429943004301430243034304430543064307430843094310431143124313431443154316431743184319432043214322432343244325432643274328432943304331433243334334433543364337433843394340434143424343434443454346434743484349435043514352435343544355435643574358435943604361436243634364436543664367436843694370437143724373437443754376437743784379438043814382438343844385438643874388438943904391439243934394439543964397439843994400440144024403440444054406440744084409441044114412441344144415441644174418441944204421442244234424442544264427442844294430443144324433443444354436443744384439444044414442444344444445444644474448444944504451445244534454445544564457445844594460446144624463446444654466446744684469447044714472447344744475447644774478447944804481448244834484448544864487448844894490449144924493449444954496449744984499450045014502450345044505450645074508450945104511451245134514451545164517451845194520452145224523452445254526452745284529453045314532453345344535453645374538453945404541454245434544454545464547454845494550455145524553455445554556455745584559456045614562456345644565456645674568456945704571457245734574457545764577457845794580458145824583458445854586458745884589459045914592459345944595459645974598459946004601460246034604460546064607460846094610461146124613461446154616461746184619462046214622462346244625462646274628462946304631463246334634463546364637463846394640464146424643464446454646464746484649465046514652465346544655465646574658465946604661466246634664466546664667466846694670467146724673467446754676467746784679468046814682468346844685468646874688468946904691469246934694469546964697469846994700470147024703470447054706470747084709471047114712471347144715471647174718471947204721472247234724472547264727472847294730473147324733473447354736473747384739474047414742474347444745474647474748474947504751475247534754475547564757475847594760476147624763476447654766476747684769477047714772477347744775477647774778477947804781478247834784478547864787478847894790479147924793479447954796479747984799480048014802480348044805480648074808480948104811481248134814481548164817481848194820482148224823482448254826482748284829483048314832483348344835483648374838483948404841484248434844484548464847484848494850485148524853485448554856485748584859486048614862486348644865486648674868486948704871487248734874487548764877487848794880488148824883488448854886488748884889489048914892489348944895489648974898489949004901490249034904490549064907490849094910491149124913491449154916491749184919492049214922492349244925492649274928492949304931493249334934493549364937493849394940494149424943494449454946494749484949495049514952495349544955495649574958495949604961496249634964496549664967496849694970497149724973497449754976497749784979498049814982498349844985498649874988498949904991499249934994499549964997499849995000500150025003500450055006500750085009501050115012501350145015501650175018501950205021502250235024502550265027502850295030503150325033503450355036503750385039504050415042504350445045504650475048504950505051505250535054505550565057505850595060506150625063506450655066506750685069507050715072507350745075507650775078507950805081508250835084508550865087508850895090509150925093509450955096509750985099510051015102510351045105510651075108510951105111511251135114511551165117511851195120512151225123512451255126512751285129513051315132513351345135513651375138513951405141514251435144514551465147514851495150515151525153515451555156515751585159516051615162516351645165516651675168516951705171517251735174517551765177517851795180518151825183518451855186518751885189519051915192519351945195519651975198519952005201520252035204520552065207520852095210521152125213521452155216521752185219522052215222522352245225522652275228522952305231523252335234523552365237523852395240524152425243524452455246524752485249525052515252525352545255525652575258525952605261526252635264526552665267526852695270527152725273527452755276527752785279528052815282528352845285528652875288528952905291529252935294529552965297529852995300530153025303530453055306530753085309531053115312531353145315531653175318531953205321532253235324532553265327532853295330533153325333533453355336533753385339534053415342534353445345534653475348534953505351535253535354535553565357535853595360536153625363536453655366536753685369537053715372537353745375537653775378537953805381538253835384538553865387538853895390539153925393539453955396539753985399540054015402540354045405540654075408540954105411541254135414541554165417541854195420542154225423542454255426542754285429543054315432543354345435543654375438543954405441544254435444544554465447544854495450545154525453545454555456545754585459546054615462546354645465546654675468546954705471547254735474547554765477547854795480548154825483548454855486548754885489549054915492549354945495549654975498549955005501550255035504550555065507550855095510551155125513551455155516551755185519552055215522552355245525552655275528552955305531553255335534553555365537553855395540554155425543554455455546554755485549555055515552555355545555555655575558555955605561556255635564556555665567556855695570557155725573557455755576557755785579558055815582558355845585558655875588558955905591559255935594559555965597559855995600560156025603560456055606560756085609561056115612561356145615561656175618561956205621562256235624562556265627562856295630563156325633563456355636563756385639564056415642564356445645564656475648564956505651565256535654565556565657565856595660566156625663566456655666566756685669567056715672567356745675567656775678567956805681568256835684568556865687568856895690569156925693569456955696569756985699570057015702570357045705570657075708570957105711571257135714571557165717571857195720572157225723572457255726572757285729573057315732573357345735573657375738573957405741574257435744574557465747574857495750575157525753575457555756575757585759576057615762576357645765576657675768576957705771577257735774577557765777577857795780578157825783578457855786578757885789579057915792579357945795579657975798579958005801580258035804580558065807580858095810581158125813581458155816581758185819582058215822582358245825582658275828582958305831583258335834583558365837583858395840584158425843584458455846584758485849585058515852585358545855585658575858585958605861586258635864586558665867586858695870587158725873587458755876587758785879588058815882588358845885588658875888588958905891589258935894589558965897589858995900590159025903590459055906590759085909591059115912591359145915591659175918591959205921592259235924592559265927592859295930593159325933593459355936593759385939594059415942594359445945594659475948594959505951595259535954595559565957595859595960596159625963596459655966596759685969597059715972597359745975597659775978597959805981598259835984598559865987598859895990599159925993599459955996599759985999600060016002600360046005600660076008600960106011601260136014601560166017601860196020602160226023602460256026602760286029603060316032603360346035603660376038603960406041604260436044604560466047604860496050605160526053605460556056605760586059606060616062606360646065606660676068606960706071607260736074607560766077607860796080608160826083608460856086608760886089609060916092609360946095609660976098609961006101610261036104610561066107610861096110611161126113611461156116611761186119612061216122612361246125612661276128612961306131613261336134613561366137613861396140614161426143614461456146614761486149615061516152615361546155615661576158615961606161616261636164616561666167616861696170617161726173617461756176617761786179618061816182618361846185618661876188618961906191619261936194619561966197619861996200620162026203620462056206620762086209621062116212621362146215621662176218621962206221622262236224622562266227622862296230623162326233623462356236623762386239624062416242624362446245624662476248624962506251625262536254625562566257625862596260626162626263626462656266626762686269627062716272627362746275627662776278627962806281628262836284628562866287628862896290629162926293629462956296629762986299630063016302630363046305630663076308630963106311631263136314631563166317631863196320632163226323632463256326632763286329633063316332633363346335633663376338633963406341634263436344634563466347634863496350635163526353635463556356635763586359636063616362636363646365636663676368636963706371637263736374637563766377637863796380638163826383638463856386638763886389639063916392639363946395639663976398639964006401640264036404640564066407640864096410641164126413641464156416641764186419642064216422642364246425642664276428642964306431643264336434643564366437643864396440644164426443644464456446644764486449645064516452645364546455645664576458645964606461646264636464646564666467646864696470647164726473647464756476647764786479648064816482648364846485648664876488648964906491649264936494649564966497649864996500650165026503650465056506650765086509651065116512651365146515651665176518651965206521652265236524652565266527652865296530653165326533653465356536653765386539654065416542654365446545654665476548654965506551655265536554655565566557655865596560656165626563656465656566656765686569657065716572657365746575657665776578657965806581658265836584658565866587658865896590659165926593659465956596659765986599660066016602660366046605660666076608660966106611661266136614661566166617661866196620662166226623662466256626662766286629663066316632663366346635663666376638663966406641664266436644664566466647664866496650665166526653665466556656665766586659666066616662666366646665666666676668666966706671667266736674667566766677667866796680668166826683668466856686668766886689669066916692669366946695669666976698669967006701670267036704670567066707670867096710671167126713671467156716671767186719672067216722672367246725672667276728672967306731673267336734673567366737673867396740674167426743674467456746674767486749675067516752675367546755675667576758675967606761676267636764676567666767676867696770677167726773677467756776677767786779678067816782678367846785678667876788678967906791679267936794679567966797679867996800680168026803680468056806680768086809681068116812681368146815681668176818681968206821682268236824682568266827682868296830683168326833683468356836683768386839684068416842684368446845684668476848684968506851685268536854685568566857685868596860686168626863686468656866686768686869687068716872687368746875687668776878687968806881688268836884688568866887688868896890689168926893689468956896689768986899690069016902690369046905690669076908690969106911691269136914691569166917691869196920692169226923692469256926692769286929693069316932693369346935693669376938693969406941694269436944694569466947694869496950695169526953695469556956695769586959696069616962696369646965696669676968696969706971697269736974697569766977697869796980698169826983698469856986698769886989699069916992699369946995699669976998699970007001700270037004700570067007700870097010701170127013701470157016701770187019702070217022702370247025702670277028702970307031703270337034703570367037703870397040704170427043704470457046704770487049705070517052705370547055705670577058705970607061706270637064706570667067706870697070707170727073707470757076707770787079708070817082708370847085708670877088708970907091709270937094709570967097709870997100710171027103710471057106710771087109711071117112711371147115711671177118711971207121712271237124712571267127712871297130713171327133713471357136713771387139714071417142714371447145714671477148714971507151715271537154715571567157715871597160716171627163716471657166716771687169717071717172717371747175717671777178717971807181718271837184718571867187718871897190719171927193719471957196719771987199720072017202720372047205720672077208720972107211721272137214721572167217721872197220722172227223722472257226722772287229723072317232723372347235723672377238723972407241724272437244724572467247724872497250725172527253725472557256725772587259726072617262726372647265726672677268726972707271727272737274727572767277727872797280728172827283728472857286728772887289729072917292729372947295729672977298729973007301730273037304730573067307730873097310731173127313731473157316731773187319732073217322732373247325732673277328732973307331733273337334733573367337733873397340734173427343734473457346734773487349735073517352735373547355735673577358735973607361736273637364736573667367736873697370737173727373737473757376737773787379738073817382738373847385738673877388738973907391739273937394739573967397739873997400740174027403740474057406740774087409741074117412741374147415741674177418741974207421742274237424742574267427742874297430743174327433743474357436743774387439744074417442744374447445744674477448744974507451745274537454745574567457745874597460746174627463746474657466746774687469747074717472747374747475747674777478747974807481748274837484748574867487748874897490749174927493749474957496749774987499750075017502750375047505750675077508750975107511751275137514751575167517751875197520752175227523752475257526752775287529753075317532753375347535753675377538753975407541754275437544754575467547754875497550755175527553755475557556755775587559756075617562756375647565756675677568756975707571757275737574757575767577757875797580758175827583758475857586758775887589759075917592759375947595759675977598759976007601760276037604760576067607760876097610761176127613761476157616761776187619762076217622762376247625762676277628762976307631763276337634763576367637763876397640764176427643764476457646764776487649765076517652765376547655765676577658765976607661766276637664766576667667766876697670767176727673767476757676767776787679768076817682768376847685768676877688768976907691769276937694769576967697769876997700770177027703770477057706770777087709771077117712771377147715771677177718771977207721772277237724772577267727772877297730773177327733773477357736773777387739774077417742774377447745774677477748774977507751775277537754775577567757775877597760776177627763776477657766776777687769777077717772777377747775777677777778777977807781778277837784778577867787778877897790779177927793779477957796779777987799780078017802780378047805780678077808780978107811781278137814781578167817781878197820782178227823782478257826782778287829783078317832783378347835783678377838783978407841784278437844784578467847784878497850785178527853785478557856785778587859786078617862786378647865786678677868786978707871787278737874787578767877787878797880788178827883788478857886788778887889789078917892789378947895789678977898789979007901790279037904790579067907790879097910791179127913791479157916791779187919792079217922792379247925792679277928792979307931793279337934793579367937793879397940794179427943794479457946794779487949795079517952795379547955795679577958795979607961796279637964796579667967796879697970797179727973797479757976797779787979798079817982798379847985798679877988798979907991799279937994799579967997799879998000800180028003800480058006800780088009801080118012801380148015801680178018801980208021802280238024802580268027802880298030803180328033803480358036803780388039804080418042804380448045804680478048804980508051805280538054805580568057805880598060806180628063806480658066806780688069807080718072807380748075807680778078807980808081808280838084808580868087808880898090809180928093809480958096809780988099810081018102810381048105810681078108810981108111811281138114811581168117811881198120812181228123812481258126812781288129813081318132813381348135813681378138813981408141814281438144814581468147814881498150815181528153815481558156815781588159816081618162816381648165816681678168816981708171817281738174817581768177817881798180818181828183818481858186818781888189819081918192819381948195819681978198819982008201820282038204820582068207820882098210821182128213821482158216821782188219822082218222822382248225822682278228822982308231823282338234823582368237823882398240824182428243824482458246824782488249825082518252825382548255825682578258825982608261826282638264826582668267826882698270827182728273827482758276827782788279828082818282828382848285828682878288828982908291829282938294829582968297829882998300830183028303830483058306830783088309831083118312831383148315831683178318831983208321832283238324832583268327832883298330833183328333833483358336833783388339834083418342834383448345834683478348834983508351835283538354835583568357835883598360836183628363836483658366836783688369837083718372837383748375837683778378837983808381838283838384838583868387838883898390839183928393839483958396839783988399840084018402840384048405840684078408840984108411841284138414841584168417841884198420842184228423842484258426842784288429843084318432843384348435843684378438843984408441844284438444844584468447844884498450845184528453845484558456845784588459846084618462846384648465846684678468846984708471847284738474847584768477847884798480848184828483848484858486848784888489849084918492849384948495849684978498849985008501850285038504850585068507850885098510851185128513851485158516851785188519852085218522852385248525852685278528852985308531853285338534853585368537853885398540854185428543854485458546854785488549855085518552855385548555855685578558855985608561856285638564856585668567856885698570857185728573857485758576857785788579858085818582858385848585858685878588858985908591859285938594859585968597859885998600860186028603860486058606860786088609861086118612861386148615861686178618861986208621862286238624862586268627862886298630863186328633863486358636863786388639864086418642864386448645864686478648864986508651865286538654865586568657865886598660866186628663866486658666866786688669867086718672867386748675867686778678867986808681868286838684868586868687868886898690869186928693869486958696869786988699870087018702870387048705870687078708870987108711871287138714871587168717871887198720872187228723872487258726872787288729873087318732873387348735873687378738873987408741874287438744874587468747874887498750875187528753875487558756875787588759876087618762876387648765876687678768876987708771877287738774877587768777877887798780878187828783878487858786878787888789879087918792879387948795879687978798879988008801880288038804880588068807880888098810881188128813881488158816881788188819882088218822882388248825882688278828882988308831883288338834883588368837883888398840884188428843884488458846884788488849885088518852885388548855885688578858885988608861886288638864886588668867886888698870887188728873887488758876887788788879888088818882888388848885888688878888888988908891889288938894889588968897889888998900890189028903890489058906890789088909891089118912891389148915891689178918891989208921892289238924892589268927892889298930893189328933893489358936893789388939894089418942894389448945894689478948894989508951895289538954895589568957895889598960896189628963896489658966896789688969897089718972897389748975897689778978897989808981898289838984898589868987898889898990899189928993899489958996899789988999900090019002900390049005900690079008900990109011901290139014901590169017901890199020902190229023902490259026902790289029903090319032903390349035903690379038903990409041904290439044904590469047904890499050905190529053905490559056905790589059906090619062906390649065906690679068906990709071907290739074907590769077907890799080908190829083908490859086908790889089909090919092909390949095909690979098909991009101910291039104910591069107910891099110911191129113911491159116911791189119912091219122912391249125912691279128912991309131913291339134913591369137913891399140914191429143914491459146914791489149915091519152915391549155915691579158915991609161916291639164916591669167916891699170917191729173917491759176917791789179918091819182918391849185918691879188918991909191919291939194919591969197919891999200920192029203920492059206920792089209921092119212921392149215921692179218921992209221922292239224922592269227922892299230923192329233923492359236923792389239924092419242924392449245924692479248924992509251925292539254925592569257925892599260926192629263926492659266926792689269927092719272927392749275927692779278927992809281928292839284928592869287928892899290929192929293929492959296929792989299930093019302930393049305930693079308930993109311931293139314931593169317931893199320932193229323932493259326932793289329933093319332933393349335933693379338933993409341934293439344934593469347934893499350935193529353935493559356935793589359936093619362936393649365936693679368936993709371937293739374937593769377937893799380938193829383938493859386938793889389939093919392939393949395939693979398939994009401940294039404940594069407940894099410941194129413941494159416941794189419942094219422942394249425942694279428942994309431943294339434943594369437943894399440944194429443944494459446944794489449945094519452945394549455945694579458945994609461946294639464946594669467946894699470947194729473947494759476947794789479948094819482948394849485948694879488948994909491949294939494949594969497949894999500950195029503950495059506950795089509951095119512951395149515951695179518951995209521952295239524952595269527952895299530953195329533953495359536953795389539954095419542954395449545954695479548954995509551955295539554955595569557955895599560956195629563956495659566956795689569957095719572957395749575957695779578957995809581958295839584958595869587958895899590959195929593959495959596959795989599960096019602960396049605960696079608960996109611961296139614961596169617961896199620962196229623962496259626962796289629963096319632963396349635963696379638963996409641964296439644964596469647964896499650965196529653965496559656965796589659966096619662966396649665966696679668966996709671967296739674967596769677967896799680968196829683968496859686968796889689969096919692969396949695969696979698969997009701970297039704970597069707970897099710971197129713971497159716971797189719972097219722972397249725972697279728972997309731973297339734973597369737973897399740974197429743974497459746974797489749975097519752975397549755975697579758975997609761976297639764976597669767976897699770977197729773977497759776977797789779978097819782978397849785978697879788978997909791979297939794979597969797979897999800980198029803980498059806980798089809981098119812981398149815981698179818981998209821982298239824982598269827982898299830983198329833983498359836983798389839984098419842984398449845984698479848984998509851985298539854985598569857985898599860986198629863986498659866986798689869987098719872987398749875987698779878987998809881988298839884988598869887988898899890989198929893989498959896989798989899990099019902990399049905990699079908990999109911991299139914991599169917991899199920992199229923992499259926992799289929993099319932993399349935993699379938993999409941994299439944994599469947994899499950995199529953995499559956995799589959996099619962996399649965996699679968996999709971997299739974997599769977997899799980998199829983998499859986998799889989999099919992999399949995999699979998999910000'
print(s[int(input()) - 1])


index = int(input())
s = ''
for i in range(3001):
	s = s + str(i)
print(s[index])


n = int(input())
s = 0
pred = 0
for i in range(1, 20):
	m = 9 * pow(10, i - 1) * i
	s += m
	if n <= s:
		nd = pow(10, i - 1)
		sme = n - pred
		num = sme // i
		ost = sme % i
		if ost == 0:
			dig = nd + num - 1
		else:
			dig = nd + num
		d = i
		rez = []
		ddig = dig
		while d > 0:
			o = ddig % 10
			a = ddig // 10
			rez.append(o)
			d -= 1
			ddig = a
		break
	pred = s
print(str(rez[-ost]))


n = int(input())
if n <= 9:
	print(n)
elif n <= 189:
	n -= 9
	a = n / 2
	b = n % 2
	if b == 1:
		print(str(9 + a + 1)[0])
	else:
		print(str(9 + a)[1])
elif n <= 2889:
	n -= 189
	a = n / 3
	b = n % 3
	if b > 0:
		print(str(int(99 + a + 1))[b - 1])
	else:
		print(str(int(99 + a))[-1:])
elif n <= 38889:
	n -= 2889
	a = n / 4
	b = n % 4
	if b > 0:
		print(str(int(999 + a + 1))[b - 1])
	else:
		print(str(int(999 + a))[-1:])
else:
	n -= 38889
	a = n / 5
	b = n % 5
	if b > 0:
		print(str(int(9999 + a + 1))[b - 1])
	else:
		print(str(int(9999 + a))[-1:])


n = input()
if len(n) == 1:
	print(n)
	exit(0)
else:
	li = list(range(1, int(n) + 1))
	s = ''
	for i in li:
		s += str(i)
	print(s[int(n) - 1])


k = 10000
i = 1
s = ''
while i <= k:
	s = s + str(i)
	i = i + 1
n = int(input())
print(s[n - 1])


k = int(input())
ar = []
ith = 0
for i in range(1, k + 1):
	for j in str(i):
		ar.append(j)
		ith += 1
print(ar[k - 1])


from sys import stdin, stdout
import bisect
import math

def st():
	return list(stdin.readline().strip())

def inp():
	return int(stdin.readline())

def li():
	return list(map(int, stdin.readline().split()))

def mp():
	return map(int, stdin.readline().split())

def pr(n):
	stdout.write(str(n) + '\n')

def soe(limit):
	l = [1] * (limit + 1)
	prime = []
	for i in range(2, limit + 1):
		if l[i]:
			for j in range(i * i, limit + 1, i):
				l[j] = 0
	for i in range(2, limit + 1):
		if l[i]:
			prime.append(i)
	return prime

def segsoe(low, high):
	limit = int(high ** 0.5) + 1
	prime = soe(limit)
	n = high - low + 1
	l = [0] * (n + 1)
	for i in range(len(prime)):
		lowlimit = low // prime[i] * prime[i]
		if lowlimit < low:
			lowlimit += prime[i]
		if lowlimit == prime[i]:
			lowlimit += prime[i]
		for j in range(lowlimit, high + 1, prime[i]):
			l[j - low] = 1
	for i in range(low, high + 1):
		if not l[i - low]:
			if i != 1:
				print(i)

def gcd(a, b):
	while b:
		a = a % b
		(b, a) = (a, b)
	return a

def power(a, n):
	r = 1
	while n:
		if n & 1:
			r = r * a
		a *= a
		n = n >> 1
	return r

def solve():
	n = inp()
	s = ''
	for i in range(2800):
		s += str(i)
	print(s[n])
for _ in range(1):
	solve()


k = int(input())
i = 1
stri = ''
while len(stri) <= k:
	stri = stri + str(i)
	i = i + 1
print(stri[k - 1])


k = int(input())
a = ''
for i in range(1, 5005):
	a += str(i)
print(a[k - 1])


A = '1'
for n in range(2, 10 ** 4):
	A = A + str(n)
k = int(input())
print(A[k - 1])


n = int(input())
lis = ''
for i in range(1, n + 1):
	lis += str(i)
print(lis[n - 1])


k = int(input())
x = [0, 9]
i = 2
y = 90
while x[-1] < 10 ** 12:
	x.append(x[-1] + y * i)
	y *= 10
	i += 1
if k in x:
	print(9)
else:
	for t in range(len(x)):
		if k < x[t]:
			break
	e = k - x[t - 1]
	if t == 1:
		q = str(e)
	else:
		q = str(10 ** (t - 1) + e // t - 1)
	if e % t == 0:
		print(q[-1])
	else:
		q = str(int(q) + 1)
		print(q[e % t - 1])


def convert(list):
	s = [str(i) for i in list]
	res = int(''.join(s))
	return res

def split(word):
	return [char for char in word]
x = [i for i in range(2800)]
l = convert(x)
p = str(l)
main = split(p)
k = int(input())
print(main[k - 1])


import sys, math

def read_int():
	return int(sys.stdin.readline().strip())

def read_int_list():
	return list(map(int, sys.stdin.readline().strip().split()))

def read_string():
	return sys.stdin.readline().strip()

def read_string_list(delim=' '):
	return sys.stdin.readline().strip().split(delim)
k = read_int()
base_digit_number = 1
expo = 0
while k >= base_digit_number:
	base_digit_number += 9 * (expo + 1) * 10 ** expo
	expo += 1
base_digit_number -= 9 * expo * 10 ** (expo - 1)
ans_number = (k - base_digit_number) // expo + 10 ** (expo - 1)
ans_digit = str(ans_number)[(k - base_digit_number) % expo]
print(ans_digit)


n = int(input())
output = ''
for i in range(10001):
	output += str(i)
print(output[n])


def main():
	k = int(input())
	digit = 1
	low = 1
	high = 9
	totalDigit = 9
	lastTotalDigit = 0
	while totalDigit < k:
		low *= 10
		high = 10 * low - 1
		digit += 1
		lastTotalDigit = totalDigit
		totalDigit += (high + 1 - low) * digit
	k -= lastTotalDigit
	cur = str(low + (k - 1) // digit)
	print(cur[(k - 1) % digit])
main()


k = int(input())
string_1 = ''
i = 1
while len(string_1) < k:
	string_1 = string_1 + str(i)
	i = i + 1
print(string_1[k - 1])


n = int(input())
num = ''
for i in range(1, 100000):
	num += str(i)
print(num[n - 1])


prepro = [str(i) for i in range(1, 100000)]
prepro = ''.join(prepro)
output = [i for i in prepro]
n = int(input())
print(output[n - 1])


def get_kth_digit(i):
	if i < 10:
		return i
	batch = 9
	count = 9
	width = 1
	while i > 10 * batch * (width + 1) + count:
		batch *= 10
		width += 1
		count += batch * width
	k = i - count - 1
	num = 10 ** width + k // (width + 1)
	return str(num)[k % (width + 1)]

def main():
	i = int(input())
	print(get_kth_digit(i))
main()


a = ''
for i in range(5000):
	a += str(i)
k = int(input())
print(a[k])


k = int(input())
s = []
c = 0
i = 1
while c < k:
	ch = str(i)
	s.append(ch)
	c += len(ch)
	i += 1
print(''.join(s)[k - 1])


x = []
for i in range(1, 10001):
	x.append(str(i))
x = ''.join(x)
k = int(input())
print(x[k - 1])


import bisect
b = []
a = []
b.append(0)
for i in range(1, 15):
	b.append(9 * i * 10 ** (i - 1))
a.append(b[0])
for i in range(1, 15):
	a.append(a[i - 1] + b[i])
k = int(input())
th = bisect.bisect_left(a, k)
th -= 1
k = k - a[th]
start = 10 ** th
now = th + 1
rem = k % now
iss = k / now
end = start + k / now
temp = str(end - 1)
s = ''
s += temp[now - 1] + str(end) + str(end + 1)
print(s[0 + rem])


a = ''
for k in range(1, 10000):
	a = a + str(k)
	if len(a) >= 10000:
		break
s = int(input())
print(a[s - 1])


import math

def get_digit(x, pos):
	s = []
	while x > 0:
		s.append(x % 10)
		x //= 10
	return s[::-1][pos]

def find_digit(x):
	n = 0
	next_ = 9 * 10 ** n * (n + 1)
	while next_ <= x:
		x -= next_
		n += 1
		next_ = 9 * 10 ** n * (n + 1)
	if x == 0:
		return 9
	pos_ = 10 ** n + math.ceil(x / (n + 1)) - 1
	return get_digit(pos_, (x - 1) % (n + 1))
k = int(input())
print(find_digit(k))


a = int(input())
str = '12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777'
l = list(str)
print(l[a - 1])


k = int(input())
allnums = ''
for i in range(k):
	allnums = allnums + str(i + 1)
print(allnums[k - 1])


print('123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469247024712472247324742475247624772478247924802481248224832484248524862487248824892490249124922493249424952496249724982499250025012502250325042505250625072508250925102511251225132514251525162517251825192520252125222523252425252526252725282529253025312532253325342535253625372538253925402541254225432544254525462547254825492550255125522553255425552556255725582559256025612562256325642565256625672568256925702571257225732574257525762577257825792580258125822583258425852586258725882589259025912592259325942595259625972598259926002601260226032604260526062607260826092610261126122613261426152616261726182619262026212622262326242625262626272628262926302631263226332634263526362637263826392640264126422643264426452646264726482649265026512652265326542655265626572658265926602661266226632664266526662667266826692670267126722673267426752676267726782679268026812682268326842685268626872688268926902691269226932694269526962697269826992700270127022703270427052706270727082709271027112712271327142715271627172718271927202721272227232724272527262727272827292730273127322733273427352736273727382739274027412742274327442745274627472748274927502751275227532754275527562757275827592760276127622763276427652766276727682769277027712772277327742775277627772778277927802781278227832784278527862787278827892790279127922793279427952796279727982799280028012802280328042805280628072808280928102811281228132814281528162817281828192820282128222823282428252826282728282829283028312832283328342835283628372838283928402841284228432844284528462847284828492850285128522853285428552856285728582859286028612862286328642865286628672868286928702871287228732874287528762877287828792880288128822883288428852886288728882889289028912892289328942895289628972898289929002901290229032904290529062907290829092910291129122913291429152916291729182919292029212922292329242925292629272928292929302931293229332934293529362937293829392940294129422943294429452946294729482949295029512952295329542955295629572958295929602961296229632964296529662967296829692970297129722973297429752976297729782979298029812982298329842985298629872988298929902991299229932994299529962997299829993000300130023003300430053006300730083009301030113012301330143015301630173018301930203021302230233024302530263027302830293030303130323033303430353036303730383039304030413042304330443045304630473048304930503051305230533054305530563057305830593060306130623063306430653066306730683069307030713072307330743075307630773078307930803081308230833084308530863087308830893090309130923093309430953096309730983099310031013102310331043105310631073108310931103111311231133114311531163117311831193120312131223123312431253126312731283129313031313132313331343135313631373138313931403141314231433144314531463147314831493150315131523153315431553156315731583159316031613162316331643165316631673168316931703171317231733174317531763177317831793180318131823183318431853186318731883189319031913192319331943195319631973198319932003201320232033204320532063207320832093210321132123213321432153216321732183219322032213222322332243225322632273228322932303231323232333234323532363237323832393240324132423243324432453246324732483249325032513252325332543255325632573258325932603261326232633264326532663267326832693270327132723273327432753276327732783279328032813282328332843285328632873288328932903291329232933294329532963297329832993300330133023303330433053306330733083309331033113312331333143315331633173318331933203321332233233324332533263327332833293330333133323333333433353336333733383339334033413342334333443345334633473348334933503351335233533354335533563357335833593360336133623363336433653366336733683369337033713372337333743375337633773378337933803381338233833384338533863387338833893390339133923393339433953396339733983399340034013402340334043405340634073408340934103411341234133414341534163417341834193420342134223423342434253426342734283429343034313432343334343435343634373438343934403441344234433444344534463447344834493450345134523453345434553456345734583459346034613462346334643465346634673468346934703471347234733474347534763477347834793480348134823483348434853486348734883489349034913492349334943495349634973498349935003501350235033504350535063507350835093510351135123513351435153516351735183519352035213522352335243525352635273528352935303531353235333534353535363537353835393540354135423543354435453546354735483549355035513552355335543555355635573558355935603561356235633564356535663567356835693570357135723573357435753576357735783579358035813582358335843585358635873588358935903591359235933594359535963597359835993600360136023603360436053606360736083609361036113612361336143615361636173618361936203621362236233624362536263627362836293630363136323633363436353636363736383639364036413642364336443645364636473648364936503651365236533654365536563657365836593660366136623663366436653666366736683669367036713672367336743675367636773678367936803681368236833684368536863687368836893690369136923693369436953696369736983699370037013702370337043705370637073708370937103711371237133714371537163717371837193720372137223723372437253726372737283729373037313732373337343735373637373738373937403741374237433744374537463747374837493750375137523753375437553756375737583759376037613762376337643765376637673768376937703771377237733774377537763777377837793780378137823783378437853786378737883789379037913792379337943795379637973798379938003801380238033804380538063807380838093810381138123813381438153816381738183819382038213822382338243825382638273828382938303831383238333834383538363837383838393840384138423843384438453846384738483849385038513852385338543855385638573858385938603861386238633864386538663867386838693870387138723873387438753876387738783879388038813882388338843885388638873888388938903891389238933894389538963897389838993900390139023903390439053906390739083909391039113912391339143915391639173918391939203921392239233924392539263927392839293930393139323933393439353936393739383939394039413942394339443945394639473948394939503951395239533954395539563957395839593960396139623963396439653966396739683969397039713972397339743975397639773978397939803981398239833984398539863987398839893990399139923993399439953996399739983999400040014002400340044005400640074008400940104011401240134014401540164017401840194020402140224023402440254026402740284029403040314032403340344035403640374038403940404041404240434044404540464047404840494050405140524053405440554056405740584059406040614062406340644065406640674068406940704071407240734074407540764077407840794080408140824083408440854086408740884089409040914092409340944095409640974098409941004101410241034104410541064107410841094110411141124113411441154116411741184119412041214122412341244125412641274128412941304131413241334134413541364137413841394140414141424143414441454146414741484149415041514152415341544155415641574158415941604161416241634164416541664167416841694170417141724173417441754176417741784179418041814182418341844185418641874188418941904191419241934194419541964197419841994200420142024203420442054206420742084209421042114212421342144215421642174218421942204221422242234224422542264227422842294230423142324233423442354236423742384239424042414242424342444245424642474248424942504251425242534254425542564257425842594260426142624263426442654266426742684269427042714272427342744275427642774278427942804281428242834284428542864287428842894290429142924293429442954296429742984299430043014302430343044305430643074308430943104311431243134314431543164317431843194320432143224323432443254326432743284329433043314332433343344335433643374338433943404341434243434344434543464347434843494350435143524353435443554356435743584359436043614362436343644365436643674368436943704371437243734374437543764377437843794380438143824383438443854386438743884389439043914392439343944395439643974398439944004401440244034404440544064407440844094410441144124413441444154416441744184419442044214422442344244425442644274428442944304431443244334434443544364437443844394440444144424443444444454446444744484449445044514452445344544455445644574458445944604461446244634464446544664467446844694470447144724473447444754476447744784479448044814482448344844485448644874488448944904491449244934494449544964497449844994500450145024503450445054506450745084509451045114512451345144515451645174518451945204521452245234524452545264527452845294530453145324533453445354536453745384539454045414542454345444545454645474548454945504551455245534554455545564557455845594560456145624563456445654566456745684569457045714572457345744575457645774578457945804581458245834584458545864587458845894590459145924593459445954596459745984599460046014602460346044605460646074608460946104611461246134614461546164617461846194620462146224623462446254626462746284629463046314632463346344635463646374638463946404641464246434644464546464647464846494650465146524653465446554656465746584659466046614662466346644665466646674668466946704671467246734674467546764677467846794680468146824683468446854686468746884689469046914692469346944695469646974698469947004701470247034704470547064707470847094710471147124713471447154716471747184719472047214722472347244725472647274728472947304731473247334734473547364737473847394740474147424743474447454746474747484749475047514752475347544755475647574758475947604761476247634764476547664767476847694770477147724773477447754776477747784779478047814782478347844785478647874788478947904791479247934794479547964797479847994800480148024803480448054806480748084809481048114812481348144815481648174818481948204821482248234824482548264827482848294830483148324833483448354836483748384839484048414842484348444845484648474848484948504851485248534854485548564857485848594860486148624863486448654866486748684869487048714872487348744875487648774878487948804881488248834884488548864887488848894890489148924893489448954896489748984899490049014902490349044905490649074908490949104911491249134914491549164917491849194920492149224923492449254926492749284929493049314932493349344935493649374938493949404941494249434944494549464947494849494950495149524953495449554956495749584959496049614962496349644965496649674968496949704971497249734974497549764977497849794980498149824983498449854986498749884989499049914992499349944995499649974998499950005001500250035004500550065007500850095010501150125013501450155016501750185019502050215022502350245025502650275028502950305031503250335034503550365037503850395040504150425043504450455046504750485049505050515052505350545055505650575058505950605061506250635064506550665067506850695070507150725073507450755076507750785079508050815082508350845085508650875088508950905091509250935094509550965097509850995100510151025103510451055106510751085109511051115112511351145115511651175118511951205121512251235124512551265127512851295130513151325133513451355136513751385139514051415142514351445145514651475148514951505151515251535154515551565157515851595160516151625163516451655166516751685169517051715172517351745175517651775178517951805181518251835184518551865187518851895190519151925193519451955196519751985199520052015202520352045205520652075208520952105211521252135214521552165217521852195220522152225223522452255226522752285229523052315232523352345235523652375238523952405241524252435244524552465247524852495250525152525253525452555256525752585259526052615262526352645265526652675268526952705271527252735274527552765277527852795280528152825283528452855286528752885289529052915292529352945295529652975298529953005301530253035304530553065307530853095310531153125313531453155316531753185319532053215322532353245325532653275328532953305331533253335334533553365337533853395340534153425343534453455346534753485349535053515352535353545355535653575358535953605361536253635364536553665367536853695370537153725373537453755376537753785379538053815382538353845385538653875388538953905391539253935394539553965397539853995400540154025403540454055406540754085409541054115412541354145415541654175418541954205421542254235424542554265427542854295430543154325433543454355436543754385439544054415442544354445445544654475448544954505451545254535454545554565457545854595460546154625463546454655466546754685469547054715472547354745475547654775478547954805481548254835484548554865487548854895490549154925493549454955496549754985499550055015502550355045505550655075508550955105511551255135514551555165517551855195520552155225523552455255526552755285529553055315532553355345535553655375538553955405541554255435544554555465547554855495550555155525553555455555556555755585559556055615562556355645565556655675568556955705571557255735574557555765577557855795580558155825583558455855586558755885589559055915592559355945595559655975598559956005601560256035604560556065607560856095610561156125613561456155616561756185619562056215622562356245625562656275628562956305631563256335634563556365637563856395640564156425643564456455646564756485649565056515652565356545655565656575658565956605661566256635664566556665667566856695670567156725673567456755676567756785679568056815682568356845685568656875688568956905691569256935694569556965697569856995700570157025703570457055706570757085709571057115712571357145715571657175718571957205721572257235724572557265727572857295730573157325733573457355736573757385739574057415742574357445745574657475748574957505751575257535754575557565757575857595760576157625763576457655766576757685769577057715772577357745775577657775778577957805781578257835784578557865787578857895790579157925793579457955796579757985799580058015802580358045805580658075808580958105811581258135814581558165817581858195820582158225823582458255826582758285829583058315832583358345835583658375838583958405841584258435844584558465847584858495850585158525853585458555856585758585859586058615862586358645865586658675868586958705871587258735874587558765877587858795880588158825883588458855886588758885889589058915892589358945895589658975898589959005901590259035904590559065907590859095910591159125913591459155916591759185919592059215922592359245925592659275928592959305931593259335934593559365937593859395940594159425943594459455946594759485949595059515952595359545955595659575958595959605961596259635964596559665967596859695970597159725973597459755976597759785979598059815982598359845985598659875988598959905991599259935994599559965997599859996000600160026003600460056006600760086009601060116012601360146015601660176018601960206021602260236024602560266027602860296030603160326033603460356036603760386039604060416042604360446045604660476048604960506051605260536054605560566057605860596060606160626063606460656066606760686069607060716072607360746075607660776078607960806081608260836084608560866087608860896090609160926093609460956096609760986099610061016102610361046105610661076108610961106111611261136114611561166117611861196120612161226123612461256126612761286129613061316132613361346135613661376138613961406141614261436144614561466147614861496150615161526153615461556156615761586159616061616162616361646165616661676168616961706171617261736174617561766177617861796180618161826183618461856186618761886189619061916192619361946195619661976198619962006201620262036204620562066207620862096210621162126213621462156216621762186219622062216222622362246225622662276228622962306231623262336234623562366237623862396240624162426243624462456246624762486249625062516252625362546255625662576258625962606261626262636264626562666267626862696270627162726273627462756276627762786279628062816282628362846285628662876288628962906291629262936294629562966297629862996300630163026303630463056306630763086309631063116312631363146315631663176318631963206321632263236324632563266327632863296330633163326333633463356336633763386339634063416342634363446345634663476348634963506351635263536354635563566357635863596360636163626363636463656366636763686369637063716372637363746375637663776378637963806381638263836384638563866387638863896390639163926393639463956396639763986399640064016402640364046405640664076408640964106411641264136414641564166417641864196420642164226423642464256426642764286429643064316432643364346435643664376438643964406441644264436444644564466447644864496450645164526453645464556456645764586459646064616462646364646465646664676468646964706471647264736474647564766477647864796480648164826483648464856486648764886489649064916492649364946495649664976498649965006501650265036504650565066507650865096510651165126513651465156516651765186519652065216522652365246525652665276528652965306531653265336534653565366537653865396540654165426543654465456546654765486549655065516552655365546555655665576558655965606561656265636564656565666567656865696570657165726573657465756576657765786579658065816582658365846585658665876588658965906591659265936594659565966597659865996600660166026603660466056606660766086609661066116612661366146615661666176618661966206621662266236624662566266627662866296630663166326633663466356636663766386639664066416642664366446645664666476648664966506651665266536654665566566657665866596660666166626663666466656666666766686669667066716672667366746675667666776678667966806681668266836684668566866687668866896690669166926693669466956696669766986699670067016702670367046705670667076708670967106711671267136714671567166717671867196720672167226723672467256726672767286729673067316732673367346735673667376738673967406741674267436744674567466747674867496750675167526753675467556756675767586759676067616762676367646765676667676768676967706771677267736774677567766777677867796780678167826783678467856786678767886789679067916792679367946795679667976798679968006801680268036804680568066807680868096810681168126813681468156816681768186819682068216822682368246825682668276828682968306831683268336834683568366837683868396840684168426843684468456846684768486849685068516852685368546855685668576858685968606861686268636864686568666867686868696870687168726873687468756876687768786879688068816882688368846885688668876888688968906891689268936894689568966897689868996900690169026903690469056906690769086909691069116912691369146915691669176918691969206921692269236924692569266927692869296930693169326933693469356936693769386939694069416942694369446945694669476948694969506951695269536954695569566957695869596960696169626963696469656966696769686969697069716972697369746975697669776978697969806981698269836984698569866987698869896990699169926993699469956996699769986999700070017002700370047005700670077008700970107011701270137014701570167017701870197020702170227023702470257026702770287029703070317032703370347035703670377038703970407041704270437044704570467047704870497050705170527053705470557056705770587059706070617062706370647065706670677068706970707071707270737074707570767077707870797080708170827083708470857086708770887089709070917092709370947095709670977098709971007101710271037104710571067107710871097110711171127113711471157116711771187119712071217122712371247125712671277128712971307131713271337134713571367137713871397140714171427143714471457146714771487149715071517152715371547155715671577158715971607161716271637164716571667167716871697170717171727173717471757176717771787179718071817182718371847185718671877188718971907191719271937194719571967197719871997200720172027203720472057206720772087209721072117212721372147215721672177218721972207221722272237224722572267227722872297230723172327233723472357236723772387239724072417242724372447245724672477248724972507251725272537254725572567257725872597260726172627263726472657266726772687269727072717272727372747275727672777278727972807281728272837284728572867287728872897290729172927293729472957296729772987299730073017302730373047305730673077308730973107311731273137314731573167317731873197320732173227323732473257326732773287329733073317332733373347335733673377338733973407341734273437344734573467347734873497350735173527353735473557356735773587359736073617362736373647365736673677368736973707371737273737374737573767377737873797380738173827383738473857386738773887389739073917392739373947395739673977398739974007401740274037404740574067407740874097410741174127413741474157416741774187419742074217422742374247425742674277428742974307431743274337434743574367437743874397440744174427443744474457446744774487449745074517452745374547455745674577458745974607461746274637464746574667467746874697470747174727473747474757476747774787479748074817482748374847485748674877488748974907491749274937494749574967497749874997500750175027503750475057506750775087509751075117512751375147515751675177518751975207521752275237524752575267527752875297530753175327533753475357536753775387539754075417542754375447545754675477548754975507551755275537554755575567557755875597560756175627563756475657566756775687569757075717572757375747575757675777578757975807581758275837584758575867587758875897590759175927593759475957596759775987599760076017602760376047605760676077608760976107611761276137614761576167617761876197620762176227623762476257626762776287629763076317632763376347635763676377638763976407641764276437644764576467647764876497650765176527653765476557656765776587659766076617662766376647665766676677668766976707671767276737674767576767677767876797680768176827683768476857686768776887689769076917692769376947695769676977698769977007701770277037704770577067707770877097710771177127713771477157716771777187719772077217722772377247725772677277728772977307731773277337734773577367737773877397740774177427743774477457746774777487749775077517752775377547755775677577758775977607761776277637764776577667767776877697770777177727773777477757776777777787779778077817782778377847785778677877788778977907791779277937794779577967797779877997800780178027803780478057806780778087809781078117812781378147815781678177818781978207821782278237824782578267827782878297830783178327833783478357836783778387839784078417842784378447845784678477848784978507851785278537854785578567857785878597860786178627863786478657866786778687869787078717872787378747875787678777878787978807881788278837884788578867887788878897890789178927893789478957896789778987899790079017902790379047905790679077908790979107911791279137914791579167917791879197920792179227923792479257926792779287929793079317932793379347935793679377938793979407941794279437944794579467947794879497950795179527953795479557956795779587959796079617962796379647965796679677968796979707971797279737974797579767977797879797980798179827983798479857986798779887989799079917992799379947995799679977998799980008001800280038004800580068007800880098010801180128013801480158016801780188019802080218022802380248025802680278028802980308031803280338034803580368037803880398040804180428043804480458046804780488049805080518052805380548055805680578058805980608061806280638064806580668067806880698070807180728073807480758076807780788079808080818082808380848085808680878088808980908091809280938094809580968097809880998100810181028103810481058106810781088109811081118112811381148115811681178118811981208121812281238124812581268127812881298130813181328133813481358136813781388139814081418142814381448145814681478148814981508151815281538154815581568157815881598160816181628163816481658166816781688169817081718172817381748175817681778178817981808181818281838184818581868187818881898190819181928193819481958196819781988199820082018202820382048205820682078208820982108211821282138214821582168217821882198220822182228223822482258226822782288229823082318232823382348235823682378238823982408241824282438244824582468247824882498250825182528253825482558256825782588259826082618262826382648265826682678268826982708271827282738274827582768277827882798280828182828283828482858286828782888289829082918292829382948295829682978298829983008301830283038304830583068307830883098310831183128313831483158316831783188319832083218322832383248325832683278328832983308331833283338334833583368337833883398340834183428343834483458346834783488349835083518352835383548355835683578358835983608361836283638364836583668367836883698370837183728373837483758376837783788379838083818382838383848385838683878388838983908391839283938394839583968397839883998400840184028403840484058406840784088409841084118412841384148415841684178418841984208421842284238424842584268427842884298430843184328433843484358436843784388439844084418442844384448445844684478448844984508451845284538454845584568457845884598460846184628463846484658466846784688469847084718472847384748475847684778478847984808481848284838484848584868487848884898490849184928493849484958496849784988499850085018502850385048505850685078508850985108511851285138514851585168517851885198520852185228523852485258526852785288529853085318532853385348535853685378538853985408541854285438544854585468547854885498550855185528553855485558556855785588559856085618562856385648565856685678568856985708571857285738574857585768577857885798580858185828583858485858586858785888589859085918592859385948595859685978598859986008601860286038604860586068607860886098610861186128613861486158616861786188619862086218622862386248625862686278628862986308631863286338634863586368637863886398640864186428643864486458646864786488649865086518652865386548655865686578658865986608661866286638664866586668667866886698670867186728673867486758676867786788679868086818682868386848685868686878688868986908691869286938694869586968697869886998700870187028703870487058706870787088709871087118712871387148715871687178718871987208721872287238724872587268727872887298730873187328733873487358736873787388739874087418742874387448745874687478748874987508751875287538754875587568757875887598760876187628763876487658766876787688769877087718772877387748775877687778778877987808781878287838784878587868787878887898790879187928793879487958796879787988799880088018802880388048805880688078808880988108811881288138814881588168817881888198820882188228823882488258826882788288829883088318832883388348835883688378838883988408841884288438844884588468847884888498850885188528853885488558856885788588859886088618862886388648865886688678868886988708871887288738874887588768877887888798880888188828883888488858886888788888889889088918892889388948895889688978898889989008901890289038904890589068907890889098910891189128913891489158916891789188919892089218922892389248925892689278928892989308931893289338934893589368937893889398940894189428943894489458946894789488949895089518952895389548955895689578958895989608961896289638964896589668967896889698970897189728973897489758976897789788979898089818982898389848985898689878988898989908991899289938994899589968997899889999000900190029003900490059006900790089009901090119012901390149015901690179018901990209021902290239024902590269027902890299030903190329033903490359036903790389039904090419042904390449045904690479048904990509051905290539054905590569057905890599060906190629063906490659066906790689069907090719072907390749075907690779078907990809081908290839084908590869087908890899090909190929093909490959096909790989099910091019102910391049105910691079108910991109111911291139114911591169117911891199120912191229123912491259126912791289129913091319132913391349135913691379138913991409141914291439144914591469147914891499150915191529153915491559156915791589159916091619162916391649165916691679168916991709171917291739174917591769177917891799180918191829183918491859186918791889189919091919192919391949195919691979198919992009201920292039204920592069207920892099210921192129213921492159216921792189219922092219222922392249225922692279228922992309231923292339234923592369237923892399240924192429243924492459246924792489249925092519252925392549255925692579258925992609261926292639264926592669267926892699270927192729273927492759276927792789279928092819282928392849285928692879288928992909291929292939294929592969297929892999300930193029303930493059306930793089309931093119312931393149315931693179318931993209321932293239324932593269327932893299330933193329333933493359336933793389339934093419342934393449345934693479348934993509351935293539354935593569357935893599360936193629363936493659366936793689369937093719372937393749375937693779378937993809381938293839384938593869387938893899390939193929393939493959396939793989399940094019402940394049405940694079408940994109411941294139414941594169417941894199420942194229423942494259426942794289429943094319432943394349435943694379438943994409441944294439444944594469447944894499450945194529453945494559456945794589459946094619462946394649465946694679468946994709471947294739474947594769477947894799480948194829483948494859486948794889489949094919492949394949495949694979498949995009501950295039504950595069507950895099510951195129513951495159516951795189519952095219522952395249525952695279528952995309531953295339534953595369537953895399540954195429543954495459546954795489549955095519552955395549555955695579558955995609561956295639564956595669567956895699570957195729573957495759576957795789579958095819582958395849585958695879588958995909591959295939594959595969597959895999600960196029603960496059606960796089609961096119612961396149615961696179618961996209621962296239624962596269627962896299630963196329633963496359636963796389639964096419642964396449645964696479648964996509651965296539654965596569657965896599660966196629663966496659666966796689669967096719672967396749675967696779678967996809681968296839684968596869687968896899690969196929693969496959696969796989699970097019702970397049705970697079708970997109711971297139714971597169717971897199720972197229723972497259726972797289729973097319732973397349735973697379738973997409741974297439744974597469747974897499750975197529753975497559756975797589759976097619762976397649765976697679768976997709771977297739774977597769777977897799780978197829783978497859786978797889789979097919792979397949795979697979798979998009801980298039804980598069807980898099810981198129813981498159816981798189819982098219822982398249825982698279828982998309831983298339834983598369837983898399840984198429843984498459846984798489849985098519852985398549855985698579858985998609861986298639864986598669867986898699870987198729873987498759876987798789879988098819882988398849885988698879888988998909891989298939894989598969897989898999900990199029903990499059906990799089909991099119912991399149915991699179918991999209921992299239924992599269927992899299930993199329933993499359936993799389939994099419942994399449945994699479948994999509951995299539954995599569957995899599960996199629963996499659966996799689969997099719972997399749975997699779978997999809981998299839984998599869987998899899990999199929993999499959996999799989999'[int(input()) - 1])


k = int(input())
l = [str(n) for n in range(1, k + 1)]
x = ''
a = x.join(l)
print(a[k - 1])


string = ''
for i in range(1, 10000):
	a = str(i)
	string = string + a
num = int(input())
s = list(string)
print(s[num - 1])


import sys
input = sys.stdin.readline
n = int(input())
s = ''
cnt = 0
for i in range(1, 10000):
	t = str(i)
	s += t
	cnt += len(t)
	if cnt >= n:
		print(s[n - 1])
		break


k = int(input(''))
t = 0
if k == 0:
	print('Invalid input')
	exit()
while k > 0:
	if k <= 9 * 10 ** t * (t + 1):
		m = k // (t + 1)
		l = k
	k = k - 9 * 10 ** t * (t + 1)
	t += 1
p = l % t
if p == 0:
	n = 10 ** (t - 1) + m - 1
	o = n % 10
else:
	n = 10 ** (t - 1) + m
	o = n // 10 ** (t - p) % 10
print(o)


k = int(input())
x = 0
c = 0
while x < k:
	x += 9 * 10 ** c * (c + 1)
	c += 1
p = (x - k) % c
k = 10 ** c - int((x - k) / c) - 1
k = str(k)
print(k[len(k) - p - 1])


l = int(input())
k = ''
for i in range(1, 10001):
	k = k + str(i)
m = str(k)
print(m[l - 1])


k = int(input())
if k < 10:
	print(k)
else:
	s = ''
	for i in range(1, k + 1):
		s += str(i)
	print(s[k - 1])


a = ''
n = int(input())
for i in range(1, 2778):
	a += str(i)
print(a[n - 1])


import sys, math

def read_int():
	return int(sys.stdin.readline().strip())

def read_int_list():
	return list(map(int, sys.stdin.readline().strip().split()))

def read_string():
	return sys.stdin.readline().strip()

def read_string_list(delim=' '):
	return sys.stdin.readline().strip().split(delim)
seq = ''
for i in range(1, 3000):
	seq += str(i)
print(seq[read_int() - 1])


seq = ''
i = 1
while i <= 10000:
	seq += str(i)
	i += 1
print(seq[int(input()) - 1])


x = input()
z = []
a = 1
for y in range(int(x) + 1):
	z.append(str(a))
	a += 1
b = ''.join(z)
print(b[int(x) - 1])


z = int(input())
string = ''
for i in range(1, z + 2):
	string += str(i)
print(string[z - 1])


a = list('1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274327532763277327832793280328132823283328432853286328732883289329032913292329332943295329632973298329933003301330233033304330533063307330833093310331133123313331433153316331733183319332033213322332333243325332633273328332933303331333233333334333533363337333833393340334133423343334433453346334733483349335033513352335333543355335633573358335933603361336233633364336533663367336833693370337133723373337433753376337733783379338033813382338333843385338633873388338933903391339233933394339533963397339833993400340134023403340434053406340734083409341034113412341334143415341634173418341934203421342234233424342534263427342834293430343134323433343434353436343734383439344034413442344334443445344634473448344934503451345234533454345534563457345834593460346134623463346434653466346734683469347034713472347334743475347634773478347934803481348234833484348534863487348834893490349134923493349434953496349734983499350035013502350335043505350635073508350935103511351235133514351535163517351835193520352135223523352435253526352735283529353035313532353335343535353635373538353935403541354235433544354535463547354835493550355135523553355435553556355735583559356035613562356335643565356635673568356935703571357235733574357535763577357835793580358135823583358435853586358735883589359035913592359335943595359635973598359936003601360236033604360536063607360836093610361136123613361436153616361736183619362036213622362336243625362636273628362936303631363236333634363536363637363836393640364136423643364436453646364736483649365036513652365336543655365636573658365936603661366236633664366536663667366836693670367136723673367436753676367736783679368036813682368336843685368636873688368936903691369236933694369536963697369836993700370137023703370437053706370737083709371037113712371337143715371637173718371937203721372237233724372537263727372837293730373137323733373437353736373737383739374037413742374337443745374637473748374937503751375237533754375537563757375837593760376137623763376437653766376737683769377037713772377337743775377637773778377937803781378237833784378537863787378837893790379137923793379437953796379737983799380038013802380338043805380638073808380938103811381238133814381538163817381838193820382138223823382438253826382738283829383038313832383338343835383638373838383938403841384238433844384538463847384838493850385138523853385438553856385738583859386038613862386338643865386638673868386938703871387238733874387538763877387838793880388138823883388438853886388738883889389038913892389338943895389638973898389939003901390239033904390539063907390839093910391139123913391439153916391739183919392039213922392339243925392639273928392939303931393239333934393539363937393839393940394139423943394439453946394739483949395039513952395339543955395639573958395939603961396239633964396539663967396839693970397139723973397439753976397739783979398039813982398339843985398639873988398939903991399239933994399539963997399839994000400140024003400440054006400740084009401040114012401340144015401640174018401940204021402240234024402540264027402840294030403140324033403440354036403740384039404040414042404340444045404640474048404940504051405240534054405540564057405840594060406140624063406440654066406740684069407040714072407340744075407640774078407940804081408240834084408540864087408840894090409140924093409440954096409740984099410041014102410341044105410641074108410941104111411241134114411541164117411841194120412141224123412441254126412741284129413041314132413341344135413641374138413941404141414241434144414541464147414841494150415141524153415441554156415741584159416041614162416341644165416641674168416941704171417241734174417541764177417841794180418141824183418441854186418741884189419041914192419341944195419641974198419942004201420242034204420542064207420842094210421142124213421442154216421742184219422042214222422342244225422642274228422942304231423242334234423542364237423842394240424142424243424442454246424742484249425042514252425342544255425642574258425942604261426242634264426542664267426842694270427142724273427442754276427742784279428042814282428342844285428642874288428942904291429242934294429542964297429842994300430143024303430443054306430743084309431043114312431343144315431643174318431943204321432243234324432543264327432843294330433143324333433443354336433743384339434043414342434343444345434643474348434943504351435243534354435543564357435843594360436143624363436443654366436743684369437043714372437343744375437643774378437943804381438243834384438543864387438843894390439143924393439443954396439743984399440044014402440344044405440644074408440944104411441244134414441544164417441844194420442144224423442444254426442744284429443044314432443344344435443644374438443944404441444244434444444544464447444844494450445144524453445444554456445744584459446044614462446344644465446644674468446944704471447244734474447544764477447844794480448144824483448444854486448744884489449044914492449344944495449644974498449945004501450245034504450545064507450845094510451145124513451445154516451745184519452045214522452345244525452645274528452945304531453245334534453545364537453845394540454145424543454445454546454745484549455045514552455345544555455645574558455945604561456245634564456545664567456845694570457145724573457445754576457745784579458045814582458345844585458645874588458945904591459245934594459545964597459845994600460146024603460446054606460746084609461046114612461346144615461646174618461946204621462246234624462546264627462846294630463146324633463446354636463746384639464046414642464346444645464646474648464946504651465246534654465546564657465846594660466146624663466446654666466746684669467046714672467346744675467646774678467946804681468246834684468546864687468846894690469146924693469446954696469746984699470047014702470347044705470647074708470947104711471247134714471547164717471847194720472147224723472447254726472747284729473047314732473347344735473647374738473947404741474247434744474547464747474847494750475147524753475447554756475747584759476047614762476347644765476647674768476947704771477247734774477547764777477847794780478147824783478447854786478747884789479047914792479347944795479647974798479948004801480248034804480548064807480848094810481148124813481448154816481748184819482048214822482348244825482648274828482948304831483248334834483548364837483848394840484148424843484448454846484748484849485048514852485348544855485648574858485948604861486248634864486548664867486848694870487148724873487448754876487748784879488048814882488348844885488648874888488948904891489248934894489548964897489848994900490149024903490449054906490749084909491049114912491349144915491649174918491949204921492249234924492549264927492849294930493149324933493449354936493749384939494049414942494349444945494649474948494949504951495249534954495549564957495849594960496149624963496449654966496749684969497049714972497349744975497649774978497949804981498249834984498549864987498849894990499149924993499449954996499749984999500050015002500350045005500650075008500950105011501250135014501550165017501850195020502150225023502450255026502750285029503050315032503350345035503650375038503950405041504250435044504550465047504850495050505150525053505450555056505750585059506050615062506350645065506650675068506950705071507250735074507550765077507850795080508150825083508450855086508750885089509050915092509350945095509650975098509951005101510251035104510551065107510851095110511151125113511451155116511751185119512051215122512351245125512651275128512951305131513251335134513551365137513851395140514151425143514451455146514751485149515051515152515351545155515651575158515951605161516251635164516551665167516851695170517151725173517451755176517751785179518051815182518351845185518651875188518951905191519251935194519551965197519851995200520152025203520452055206520752085209521052115212521352145215521652175218521952205221522252235224522552265227522852295230523152325233523452355236523752385239524052415242524352445245524652475248524952505251525252535254525552565257525852595260526152625263526452655266526752685269527052715272527352745275527652775278527952805281528252835284528552865287528852895290529152925293529452955296529752985299530053015302530353045305530653075308530953105311531253135314531553165317531853195320532153225323532453255326532753285329533053315332533353345335533653375338533953405341534253435344534553465347534853495350535153525353535453555356535753585359536053615362536353645365536653675368536953705371537253735374537553765377537853795380538153825383538453855386538753885389539053915392539353945395539653975398539954005401540254035404540554065407540854095410541154125413541454155416541754185419542054215422542354245425542654275428542954305431543254335434543554365437543854395440544154425443544454455446544754485449545054515452545354545455545654575458545954605461546254635464546554665467546854695470547154725473547454755476547754785479548054815482548354845485548654875488548954905491549254935494549554965497549854995500550155025503550455055506550755085509551055115512551355145515551655175518551955205521552255235524552555265527552855295530553155325533553455355536553755385539554055415542554355445545554655475548554955505551555255535554555555565557555855595560556155625563556455655566556755685569557055715572557355745575557655775578557955805581558255835584558555865587558855895590559155925593559455955596559755985599560056015602560356045605560656075608560956105611561256135614561556165617561856195620562156225623562456255626562756285629563056315632563356345635563656375638563956405641564256435644564556465647564856495650565156525653565456555656565756585659566056615662566356645665566656675668566956705671567256735674567556765677567856795680568156825683568456855686568756885689569056915692569356945695569656975698569957005701570257035704570557065707570857095710571157125713571457155716571757185719572057215722572357245725572657275728572957305731573257335734573557365737573857395740574157425743574457455746574757485749575057515752575357545755575657575758575957605761576257635764576557665767576857695770577157725773577457755776577757785779578057815782578357845785578657875788578957905791579257935794579557965797579857995800580158025803580458055806580758085809581058115812581358145815581658175818581958205821582258235824582558265827582858295830583158325833583458355836583758385839584058415842584358445845584658475848584958505851585258535854585558565857585858595860586158625863586458655866586758685869587058715872587358745875587658775878587958805881588258835884588558865887588858895890589158925893589458955896589758985899590059015902590359045905590659075908590959105911591259135914591559165917591859195920592159225923592459255926592759285929593059315932593359345935593659375938593959405941594259435944594559465947594859495950595159525953595459555956595759585959596059615962596359645965596659675968596959705971597259735974597559765977597859795980598159825983598459855986598759885989599059915992599359945995599659975998599960006001600260036004600560066007600860096010601160126013601460156016601760186019602060216022602360246025602660276028602960306031603260336034603560366037603860396040604160426043604460456046604760486049605060516052605360546055605660576058605960606061606260636064606560666067606860696070607160726073607460756076607760786079608060816082608360846085608660876088608960906091609260936094609560966097609860996100610161026103610461056106610761086109611061116112611361146115611661176118611961206121612261236124612561266127612861296130613161326133613461356136613761386139614061416142614361446145614661476148614961506151615261536154615561566157615861596160616161626163616461656166616761686169617061716172617361746175617661776178617961806181618261836184618561866187618861896190619161926193619461956196619761986199620062016202620362046205620662076208620962106211621262136214621562166217621862196220622162226223622462256226622762286229623062316232623362346235623662376238623962406241624262436244624562466247624862496250625162526253625462556256625762586259626062616262626362646265626662676268626962706271627262736274627562766277627862796280628162826283628462856286628762886289629062916292629362946295629662976298629963006301630263036304630563066307630863096310631163126313631463156316631763186319632063216322632363246325632663276328632963306331633263336334633563366337633863396340634163426343634463456346634763486349635063516352635363546355635663576358635963606361636263636364636563666367636863696370637163726373637463756376637763786379638063816382638363846385638663876388638963906391639263936394639563966397639863996400640164026403640464056406640764086409641064116412641364146415641664176418641964206421642264236424642564266427642864296430643164326433643464356436643764386439644064416442644364446445644664476448644964506451645264536454645564566457645864596460646164626463646464656466646764686469647064716472647364746475647664776478647964806481648264836484648564866487648864896490649164926493649464956496649764986499650065016502650365046505650665076508650965106511651265136514651565166517651865196520652165226523652465256526652765286529653065316532653365346535653665376538653965406541654265436544654565466547654865496550655165526553655465556556655765586559656065616562656365646565656665676568656965706571657265736574657565766577657865796580658165826583658465856586658765886589659065916592659365946595659665976598659966006601660266036604660566066607660866096610661166126613661466156616661766186619662066216622662366246625662666276628662966306631663266336634663566366637663866396640664166426643664466456646664766486649665066516652665366546655665666576658665966606661666266636664666566666667666866696670667166726673667466756676667766786679668066816682668366846685668666876688668966906691669266936694669566966697669866996700670167026703670467056706670767086709671067116712671367146715671667176718671967206721672267236724672567266727672867296730673167326733673467356736673767386739674067416742674367446745674667476748674967506751675267536754675567566757675867596760676167626763676467656766676767686769677067716772677367746775677667776778677967806781678267836784678567866787678867896790679167926793679467956796679767986799680068016802680368046805680668076808680968106811681268136814681568166817681868196820682168226823682468256826682768286829683068316832683368346835683668376838683968406841684268436844684568466847684868496850685168526853685468556856685768586859686068616862686368646865686668676868686968706871687268736874687568766877687868796880688168826883688468856886688768886889689068916892689368946895689668976898689969006901690269036904690569066907690869096910691169126913691469156916691769186919692069216922692369246925692669276928692969306931693269336934693569366937693869396940694169426943694469456946694769486949695069516952695369546955695669576958695969606961696269636964696569666967696869696970697169726973697469756976697769786979698069816982698369846985698669876988698969906991699269936994699569966997699869997000')
print(a[int(input()) - 1])


x = ''
index = int(input())
for i in range(index + 1):
	x += str(i)
print(x[index])


n = int(input())
(seq, i) = ('1', 1)
while len(str(seq)) < n:
	i += 1
	seq += str(i)
print(seq[n - 1])


k = int(input())
strIn = ''
flag = 1
while len(strIn) < k:
	strIn += str(flag)
	flag += 1
print(strIn[k - 1])


from sys import stdin

def solve(tc):
	k = int(stdin.readline().strip())
	cmp = 9
	ndigit = 1
	while k > cmp * ndigit:
		k -= cmp * ndigit
		cmp *= 10
		ndigit += 1
	num = 10 ** (ndigit - 1) + (k - 1) // ndigit
	pos = (k - 1) % ndigit
	print(str(num)[pos])
	pass
LOCAL_TEST = not __debug__
if LOCAL_TEST:
	infile = __file__.split('.')[0] + '-test.in'
	stdin = open(infile, 'r')
tcs = int(stdin.readline().strip()) if LOCAL_TEST else 1
tc = 1
while tc <= tcs:
	solve(tc)
	tc += 1


n = int(input())
strt = 1
n -= 1
cnt = 9
while n > strt * cnt:
	n -= cnt * strt
	cnt *= 10
	strt += 1
ans = 10 ** (strt - 1)
ans += n // strt
print(str(ans)[n % strt])


index = int(input())
total = 9
n = 1
while index > total:
	total += (n + 1) * 10 ** n * 9
	n += 1
last = 10 ** (n - 1)
total -= n * 9 * last
index = index - total
r = index % n
k = index // n
number = last + k
if r == 0:
	print(str(number - 1)[n - 1])
else:
	print(str(number)[r - 1])


k = int(input())
if k <= 9:
	print(k)
else:
	length = len(str(k))
	places_occupied = 0
	for i in range(length - 1):
		places_occupied += 9 * 10 ** i * (i + 1)
		temp = places_occupied + 9 * 10 ** (i + 1) * (i + 2)
		if temp > k:
			length = i + 2
			break
	digits_string = ''
	for i in range(length - 1):
		digits_string = digits_string + '1'
	numbers_passed = 9 * int(digits_string)
	places_left = k - places_occupied
	if places_left % length == 0:
		numbers_required = places_left // length
		answer_string = str(numbers_passed + numbers_required)
		print(answer_string[len(answer_string) - 1])
	else:
		numbers_required = places_left // length + 1
		answer_string = str(numbers_passed + numbers_required)
		find_index = numbers_required * length - places_left
		print(answer_string[len(answer_string) - find_index - 1])


digit = int(input())
sent = ' '
for i in range(1, 10001):
	sent = sent + '' + str(i)
print(sent[digit])


no = int(input())
ans = ''
for i in range(1, 10000 + 1):
	ans += str(i)
print(ans[no - 1])


k = int(input())
l = []
for i in range(10000):
	l.extend(str(i))
print(l[k])


k = int(input())
k_list = [str(x) for x in range(1, 6000)]
ans_str = ''.join(k_list)
print(ans_str[k - 1])


a = []
n = 1
while len(a) < 10000:
	for i in str(n):
		a.append(int(i))
	n += 1
print(a[int(input()) - 1])


k = int(input())
if k <= 9:
	print(k)
elif k <= 189:
	if (k - 9) % 2 == 0:
		r = (k - 9) / 2
		x = str(r + 9)
		print(x[1:2])
	else:
		r = (k - 9) // 2
		x = str(r + 10)
		print(x[0:1])
elif k <= 2889:
	r = (k - 189) % 3
	if r == 0:
		x = str((k - 189) / 3 + 99)
		print(x[2:3])
	elif r == 1:
		x = str((k - 189) // 3 + 100)
		print(x[0:1])
	else:
		x = str((k - 189) // 3 + 100)
		print(x[1:2])
else:
	r = (k - 2889) % 4
	if r == 0:
		x = str((k - 2889) / 4 + 999)
		print(x[3:4])
	else:
		x = str((k - 2889) // 4 + 1000)
		if r == 1:
			print(x[0:1])
		elif r == 2:
			print(x[1:2])
		else:
			print(x[2:3])


a = int(input())
s = ''
for j in range(1, a + 1):
	s = s + str(j)
print(s[a - 1])


k = int(input())
n = 0
i = 0
while k > n:
	n += pow(10, i) * 9 * (i + 1)
	i = i + 1
n -= pow(10, i - 1) * 9 * i
k -= n
t = (k - 1) / i
r = k % i
if r == 0:
	r = i
m = pow(10, i - 1) + t
m = int(m)
ans = int(m / pow(10, i - r)) % 10
print(ans)

def pow(i):
	n = 1
	for x in range(0, i):
		n *= 10
	return n


x = int(input())
s = [i for i in range(1, 10001)]
st = ''
for i in s:
	st += str(i)
print(st[x - 1])


import bisect
xzy = [10, 190, 2890, 38890, 488890, 5888890, 68888890, 788888890, 8888888890, 98888888890, 1088888888890, 11888888888890]
k = int(input())
digits = bisect.bisect_left(xzy, k)
if k == 10:
	print(1)
elif k > 10:
	apu = k - xzy[digits - 1]
	modulo = apu % (digits + 1)
	dlj = apu // (digits + 1)
	output = 10 ** digits + dlj
	list1 = [i for i in str(output)]
	print(list1[modulo])
else:
	print(k)


s = ''
for i in range(1, 10000):
	s = s + str(i)
n = eval(input())
print(s[n - 1])


n = int(input())
c = 1
total = 0
if n < 10:
	print(n)
else:
	while True:
		total_b = total
		cek = 9 * 10 ** (c - 1) * c
		total += cek
		if n <= total:
			break
		c += 1
	n -= total_b + 1
	urut = n // c
	sisa = n % c
	angka = 10 ** (c - 1) + urut
	print(str(angka)[sisa])


k = int(input())
a = []
for i in range(0, 12):
	s = 9 * pow(10, i) * (i + 1)
	if k <= s:
		break
	else:
		k -= s
pos = i + 1
num = pow(10, pos - 1) + k // pos - 1
if k % pos == 0:
	print(str(num)[-1])
else:
	print(str(num + (0 if pos == 1 else 1))[k % pos - 1])


k = int(input())
s = ''
i = 1
while True:
	s += str(i)
	i += 1
	if len(s) >= k:
		break
print(s[k - 1])


k = int(input())
b = ''
for i in range(1, k + 1):
	b += str(i)
a = []
for i in b:
	a.append(i)
x = a[k - 1]
print(x)


n = int(input())
l = []
for i in range(0, 10001):
	l.append(str(i))
s = ''.join(l)
print(s[n])


n = int(input())
s = ''
l = 0
i = 1
while l != n:
	s = s + str(i)
	i = i + 1
	l = l + 1
print(s[n - 1])


k = int(input())
cad = ''
for i in range(1, k + 1):
	cad = cad + str(i)
print(cad[k - 1])


s = '1'
n = 2
while n < 10005:
	s = s + str(n)
	n = n + 1
x = int(input())
print(s[x - 1])


st = ''
for x in range(10000):
	st += str(x)
print(st[int(input())])


import os
k = int(input())
string = ''
i = 0
while len(string) < k:
	i = i + 1
	string = string + str(i)
print(string[k - 1])


def count(start, k):
	s = '_'
	while len(s) <= k:
		s += str(start)
		start += 1
	return s[k]
print(count(1, int(input())))


k = int(input())
s = ''
a = 0
for i in range(0, k):
	a += 1
	s += str(a)
print(s[k - 1])


k = int(input())
s = ''
now = 1
while len(s) < k:
	s += str(now)
	now += 1
print(s[k - 1])


k = int(input())
if k > 0 and k < 10:
	print(k)
elif k >= 10 and k < 190:
	result = 10 + int((k - 10) / 2)
	if (k - 10) % 2 == 0:
		print(int(result / 10))
	else:
		print(result % 10)
elif k >= 190 and k < 2890:
	result = 100 + int((k - 190) / 3)
	if (k - 190) % 3 == 0:
		print(int(result / 100))
	elif (k - 190) % 3 == 1:
		print(int(result % 100 / 10))
	else:
		print(result % 10)
else:
	result = 1000 + int((k - 2890) / 4)
	if (k - 2890) % 4 == 0:
		print(int(result / 1000))
	elif (k - 2890) % 4 == 1:
		print(int(result % 1000 / 100))
	elif (k - 2890) % 4 == 2:
		print(int(result % 100 / 10))
	else:
		print(result % 10)


k = int(input())
string = ''.join((str(x) for x in range(10000)))
print(int(string[k]))


n = int(input())
i = 1
k = ''
while i <= n:
	k = k + str(i)
	i = i + 1
marr = list(k)
print(int(marr[n - 1]))


n = int(input())
for i in range(1, 10001):
	i = str(i)
	if len(i) >= n:
		for k in range(len(i)):
			n -= 1
			if n == 0:
				print(i[k])
	else:
		n -= len(i)


import math
k = int(input())

def cnt_digit_order(X):
	res = 0
	if X == 0:
		return 0
	for i in range(1, X + 1):
		res += i * (9 * pow(10, i - 1))
	return res
L = -1
leftcnt = 0
for length in range(1, 100):
	if cnt_digit_order(length - 1) < k <= cnt_digit_order(length):
		L = length
		leftcnt = k - cnt_digit_order(length - 1)
		break
M = str(math.ceil(leftcnt / L) + (10 ** (L - 1) - 1))
leftcnt -= 1
leftcnt %= L
print(M[leftcnt])


k = int(input())
k -= 1
c = 9
s = 1
while k >= c * s:
	k -= c * s
	c *= 10
	s += 1
n = 10 ** (s - 1) + k // s
idx = k % s
print(str(n)[idx])


natural_num = ''
for i in range(1, 10001):
	natural_num += str(i)
list_each_digit = []
list_each_digit.append(0)
for letter in natural_num:
	list_each_digit.append(letter)
input_index = int(input())
print(int(list_each_digit[input_index]))


n = int(input())
x = 1
while n > 10 ** (len(str(x)) - 1) * 9 * len(str(x)):
	n -= 10 ** (len(str(x)) - 1) * 9 * len(str(x))
	x *= 10
t = len(str(x))
nadighe = False
while nadighe == False:
	qw = 1
	nadighe = True
	while n > 10 ** (len(str(qw)) - 1) * 9 * t:
		n -= 10 ** (len(str(qw)) - 1) * 9 * t
		nadighe = False
		qw *= 10
	x += qw - 1
while n > len(str(x)):
	n -= len(str(x))
	x += 1
for i in range(len(str(x))):
	if n != 0:
		s = str(x)[i]
		n -= 1
print(s)


n = int(input())
s = ''
for x in range(1, n + 10):
	s += str(x)
print(s[n - 1])


a = int(input())
A = list(range(a + 1))
A = list(''.join(map(str, A)))
print(A[a])


def mp():
	return map(int, input().split())
n = int(input())
l = 0
i = 1
last = 1
while l < n:
	l += len(str(i))
	last = i
	i += 1
last = str(last)
i = l - n + 1
print(last[-i])


bl = ''
for i in range(1, 12345):
	bl += str(i)
n = int(input())
print(bl[n - 1])


l = ''
k = int(input())
index = 0
counter = 1
while True:
	for i in str(counter):
		if index <= k - 1:
			l += i
			index += 1
	counter += 1
	if index > k - 1:
		break
if 1 <= k <= 10000:
	print(l[k - 1])


n = int(input())
i = 1
s = 0
while n - 9 * i * 10 ** (i - 1) > 0:
	n -= 9 * i * 10 ** (i - 1)
	i += 1
if i == 1:
	print(n)
elif i == 2:
	s = 9 + n // i
	if n % 2 == 1:
		print(str(s + 1)[0])
	else:
		print(str(s)[1])
elif i == 3:
	s = 99 + n // i
	if n % 3 == 1:
		print(str(s + 1)[0])
	elif n % 3 == 2:
		print(str(s + 1)[1])
	else:
		print(str(s)[2])
elif i == 4:
	s = 999 + n // i
	if n % i == 1:
		print(str(s + 1)[0])
	elif n % i == 2:
		print(str(s + 1)[1])
	elif n % i == 3:
		print(str(s + 1)[2])
	else:
		print(str(s)[3])


n = int(input())
start = 1
end = 9
nr = 1
ran = 9
l = 1
while 1:
	if n > ran:
		nr = ran
		start = start * 10
		end = end * 10 + 9
		l += 1
		ran = ran + (end - start + 1) * l
	else:
		r = n - nr - 1 * (n > 9)
		print(str(end // 10 + r // l + 1)[r % l])
		break


c = 1
x = int(input())
string = ''
while len(string) < x:
	string += str(c)
	c += 1
print(string[x - 1])


import itertools as it
k = int(input())
seq = ''
for i in it.count(1):
	seq += str(i)
	if len(seq) >= k:
		break
print(seq[k - 1])


k = int(input())
i = 0
d = 1
num = ''
while i < k + 10:
	num += str(d)
	d += 1
	i += len(str(d))
print(num[k - 1])


def scand():
	return int(input())

def scana():
	return [int(x) for x in input().split()]

def count(t):
	ret = 0
	for char in t:
		if char in ['a', 'e', 'i', 'o', 'u']:
			ret += 1
	return ret
t = ''.join([str(t) for t in range(5000)])
n = scand()
print(t[n])


def main():
	x = str()
	c = 1
	k = int(input())
	while True:
		if len(x) > k:
			break
		x += str(c)
		c += 1
	print(x[k - 1])
main()


k = int(input())
s = k
i = 1
number_digits = 1
while s - i * (9 * 10 ** (i - 1)) > 0:
	number_digits = number_digits + 1
	s = s - i * (9 * 10 ** (i - 1))
	i += 1
v = (s - 1) // number_digits
s = s - v * number_digits
ans = 10 ** (number_digits - 1) + v
ans = str(ans)
fans = ans[s - 1]
print(fans)


def main():
	k = int(input())
	s = ''.join(map(str, range(1, 3000)))
	print(s[k - 1])
main()


postion = int(input())
if postion >= 1 and postion <= 10000:
	seq = ''
	for i in range(1, postion + 1):
		seq += str(i)
	print(seq[postion - 1])


def mp():
	return map(int, input().split())

def f(i):
	return (10 ** i - 10 ** (i - 1)) * i
n = int(input())
i = 1
sum = 0
while n - f(i) >= 0:
	n -= f(i)
	sum += f(i) // i
	i += 1
print(str(sum + (n + i - 1) // i)[n % i - 1])


N = 100005
v = []
for i in range(N):
	s = str(i)
	for c in s:
		v.append(c)
	if len(v) > N:
		break
n = int(input())
print(v[n])


n = int(input()) - 1
c = 0
for i in range(11):
	c += 9 * (i + 1) * 10 ** i
	if c > n:
		n -= c - 9 * (i + 1) * 10 ** i
		v = n // (i + 1)
		print(str(10 ** i + v)[n % (i + 1)])
		break


n = 1
k = int(input())
k -= 1
l = ''
while len(l) < k + 100:
	l += str(n)
	n += 1
print(l[k])


k = int(input())
l = ''
for i in range(1, k + 1):
	l = l + str(i)
print(l[k - 1])


def digits_sequence():
	number = int(input())
	if number < 10:
		return number
	string = ''
	temp = 1
	while len(string) < number:
		string += str(temp)
		temp += 1
	return string[number - 1]
A = digits_sequence()
print(A)


k = int(input())
k_ = k
ca = 9
di = 1
tem = 9
while k_ > 0:
	k_ -= ca * di
	ca *= 10
	di += 1
	tem += ca * di
	if k_ == 0:
		break
tem -= ca * di
ca = int(ca / 10)
di -= 1
tem -= ca * di
ca = int(ca / 10)
ca_ = 0
while ca > 0:
	ca_ += ca
	ca = int(ca / 10)
k -= tem
re = int((k + di - 1) // di) + ca_
re_ = k % di
if re_ == 0:
	l = 1
else:
	l = 10 ** (di - re_)
re = int(re // l)
print(re % 10)


k = int(input())
s = ''
num = 1
while len(s) < k:
	s = s + str(num)
	num += 1
print(s[k - 1])


K = int(input())
infinite = ' '
for i in range(1, K + 1):
	infinite += str(i)
print(infinite[K])


T = (0, 9, 189, 2889, 38889)
k = int(input())
for i in T:
	if i - k > 0:
		a = T.index(i)
		break
temp = T[a] - k
x = temp % a
res = 10 ** a - 1 - int(temp / a)
ans = int(res % 10 ** (x + 1) / 10 ** x)
print(ans)


num = int(input())
mainString = ''
mainNumber = 0
while len(mainString) <= num:
	mainNumber += 1
	mainString += str(mainNumber)
print(mainString[num - 1])


k = int(input())
a = ''
for x in range(1, k + 1):
	a += str(x)
print(a[k - 1])


k = int(input())
a = 9
for i in range(1, 12):
	if k <= a * i:
		a = a // 9 + k // i - 1
		if k % i != 0:
			b = str(a + 1)
			c = k % i - 1
			print(b[c])
		else:
			b = str(a)
			print(b[-1])
		break
	else:
		k = k - a * i
		a = a * 10


a = int(input())
b = ''
c = 0
for i in range(0, 10009):
	c += 1
	b += str(c)
print(b[a - 1])


def count(start, k):
	s = '_'
	while len(s) <= k:
		s += str(start)
		start += 1
	return s[k]

def recursion(n, k):
	if k > 9 * 10 ** (n - 1) * n:
		recursion(n + 1, k - 9 * 10 ** (n - 1) * n)
	else:
		print(count(10 ** (n - 1), k))
k = int(input())
if k < 10:
	print(k)
else:
	recursion(1, k)


k = int(input())
n = 1
for i in range(1, 20):
	if k < n + 9 * 10 ** (i - 1) * i:
		print(str(10 ** (i - 1) + (k - n) // i)[(k - n) % i])
		break
	n += 9 * 10 ** (i - 1) * i


a = '1'
k = 1
while len(a) < 10000:
	k += 1
	b = str(k)
	a = a + b
n = int(input())
print(int(a[n - 1]))


def ans(n):
	s = ''
	i = 1
	while len(s) < n:
		s += str(i)
		i += 1
	return int(s[n - 1])
print(ans(int(input())))


k = int(input())
s = ''
for i in range(1, 2800):
	s += str(i)
print(s[k - 1])


import sys

def input():
	return sys.stdin.readline().rstrip()

def slv():
	k = int(input())

	def cnt_special(N):
		if N == 0:
			return 0
		return cnt_special(N - 1) + N * (pow(10, N) - pow(10, N - 1))

	def cnt_digit(N):
		ord = len(str(N))
		bound = ord - 1
		return cnt_special(bound) + ord * (N + 1 - 10 ** bound)
	if k < 10:
		print(k)
	else:
		l = 1
		r = int(1000000000000.0)
		while r - l > 1:
			med = (r + l) // 2
			if cnt_digit(med) >= k:
				r = med
			else:
				l = med
		rep = k - cnt_digit(l)
		print(str(r)[rep - 1])
		return

def main():
	t = 1
	for i in range(t):
		slv()
	return
main()