We consider a positive integer perfect, if and only if the sum of its digits is exactly $10$. Given a positive integer $k$, your task is to find the $k$-th smallest perfect positive integer.


-----Input-----

A single line with a positive integer $k$ ($1 \leq k \leq 10\,000$).


-----Output-----

A single number, denoting the $k$-th smallest perfect integer.


-----Examples-----
Input
1

Output
19

Input
2

Output
28



-----Note-----

The first perfect integer is $19$ and the second one is $28$.

Source: codeforces | Difficulty: EASY
Tags: Sorting

Implementation

Complete search

Number theory

Dynamic programming


Solutions:
def ch(a):
	ans = 0
	while a:
		ans += a % 10
		a //= 10
	return ans == 10
k = int(input())
cur = 10
while k:
	cur += 9
	if ch(cur):
		k -= 1
print(cur)


def main():
	k = int(input())
	x = 0
	b = 12000000
	while b > 0:
		while getCnts(x + b) < k:
			x += b
		b //= 2
	x += 1
	print(x)
	return
import sys
input = sys.stdin.buffer.readline

def oneLineArrayPrint(arr):
	print(' '.join([str(x) for x in arr]))

def multiLineArrayPrint(arr):
	print('\n'.join([str(x) for x in arr]))

def multiLineArrayOfArraysPrint(arr):
	print('\n'.join([' '.join([str(x) for x in y]) for y in arr]))

def getCnts(upperBound):
	arr = [int(x) for x in str(upperBound)]
	n = len(arr)
	dp = [[[0 for _ in range(2)] for __ in range(11)] for _a in range(n + 1)]
	dp[n][0][0] = 1
	dp[n][0][1] = 1
	for idx in range(n - 1, -1, -1):
		for digit in range(10):
			for summ in range(11):
				sum2 = digit + summ
				if sum2 <= 10:
					dp[idx][sum2][0] += dp[idx + 1][summ][0]
					if digit < arr[idx]:
						dp[idx][sum2][1] += dp[idx + 1][summ][0]
					elif digit == arr[idx]:
						dp[idx][sum2][1] += dp[idx + 1][summ][1]
	return dp[0][10][1]
main()


import sys, queue, string, math, itertools
try:
	import dev_act_ffc429465ab634
	DEV = True
except:
	DEV = False

def log(*s):
	if DEV:
		print('LOG', *s)

class EJudge:

	def __init__(self, problem='default', reclim=1 << 30):
		self.problem = problem
		sys.setrecursionlimit(reclim)

	def use_files(self, infile='', outfile=''):
		if infile != '':
			self.infile = open(infile)
			sys.stdin = self.infile
		if infile != '':
			self.outfile = open(outfile, 'w')
			sys.stdout = self.outfile

	def use_bacs_files(self):
		self.use_files(self.problem + '.in', self.problem + '.out')

	def get_tl(self):
		while True:
			pass

	def get_ml(self):
		tmp = [[[5] * 100000 for _ in range(1000)]]
		while True:
			tmp.append([[5] * 100000 for _ in range(1000)])

	def get_re(self):
		s = (0,)[8]

	def get_wa(self, wstr='blablalblah'):
		for _ in range(3):
			print(wstr)
		exit()

class IntReader:

	def __init__(self):
		self.ost = queue.Queue()

	def get(self):
		return int(self.sget())

	def sget(self):
		if self.ost.empty():
			for el in input().split():
				self.ost.put(el)
		return self.ost.get()

	def release(self):
		res = []
		while not self.ost.empty():
			res.append(self.ost.get())
		return res
ej = EJudge('')
int_reader = IntReader()
fmap = lambda f, *l: list(map(f, *l))
parse_int = lambda : fmap(int, input().split())
revrange = lambda x: range(x - 1, -1, -1)

def test(k):
	v = [9, 1] + [0] * 300
	for _ in range(k - 1):
		pos = 0
		while v[pos] == 0:
			pos += 1
		v[pos + 1] += 1
		v[pos] -= 1
		if v[pos + 1] == 10:
			v[pos + 2] = 1
			v[pos + 1] = 0
			v[0] = 9
		if pos > 0 and v[pos] > 0:
			v[0] = v[pos]
			v[pos] = 0
	print(int(''.join([str(x) for x in v[::-1]])), sep='')
for i in range(0):
	test(i)
test(int(input()))


def count(num):
	sm = 0
	while num:
		sm += num % 10
		num //= 10
	return sm
n = int(input())
pos = 19
while n:
	if count(pos) == 10:
		n -= 1
	pos += 9
print(pos - 9)


def sum(n):
	s = 0
	while n:
		s = s + n % 10
		n = n // 10
	return s
k = int(input())
num = 19
while k > 1:
	num = num + 9
	if sum(num) == 10:
		k = k - 1
print(num)


ls = []
cnt = 0

def gen(num, rem):
	if len(num) > 8:
		return
	if rem == 0:
		ls.append(int(num))
	for i in range(rem + 1):
		gen(num + str(i), rem - i)
for i in range(1, 10):
	gen(str(i), 10 - i)
ls.sort()
n = int(input())
print(ls[n - 1])


def good(n):
	c = 0
	while n != 0:
		c += n % 10
		n //= 10
	if c == 10:
		return True
	return False
n = int(input())
i = 0
j = 10
while i < n:
	j += 9
	if good(j):
		i += 1
print(j)


k = int(input())
a = 10
while k > 0:
	a += 9
	if sum(map(int, str(a))) == 10:
		k -= 1
print(a)


def digit_sum(x):
	ans = x % 10
	while x > 0:
		x //= 10
		ans += x % 10
	return ans
ans = 0
(i, k) = (1, 2)
num = 19
n = int(input())
while i < 10001:
	while True:
		if i == n:
			print(num)
			exit()
		num += 9
		i += 1
		if digit_sum(num) != 10:
			break
	while digit_sum(num) != 10:
		num += 9


def getSum(n):
	sum = 0
	while n != 0:
		sum = sum + int(n % 10)
		n = int(n / 10)
	return sum
k = int(input())
ans = 19
for i in range(1, k):
	ans += 9
	while getSum(ans) != 10:
		ans += 9
print(ans)


def sumOfDigits(n):
	s = 0
	while n:
		s += n % 10
		n //= 10
	return s
n = int(input())
i = 19
j = 1
while j < n:
	i += 9
	if sumOfDigits(i) == 10:
		j += 1
print(i)


def getSum(n):
	sum = 0
	while n > 0:
		sum += int(n % 10)
		n = int(n / 10)
	return sum
f = int(input())
a = 10
r = 0
while f:
	a = a + 9
	if getSum(a) == 10:
		f -= 1
print(a)


(i, n) = (0, 19)
l = []

def summation(n):
	s = 0
	while n > 0:
		s += n % 10
		n = n // 10
	return s
x = int(input())
while i <= 10000:
	if summation(n) == 10:
		i += 1
		if x == i:
			print(n)
			break
	n += 9


def sum(n):
	s = 0
	while n > 0 and s < 11:
		s += n % 10
		n = n // 10
	return s
n = int(input())
i = 19
cnt = 0
while 1:
	if sum(i) == 10:
		cnt += 1
	if cnt == n:
		print(i)
		exit(0)
	i += 9


def go(x):
	ans = 0
	while x > 0:
		ans = ans + x % 10
		x = x // 10
	if ans == 10:
		return 1
	else:
		return 0

def main():
	k = int(input())
	i = 19
	while True:
		x = go(i)
		if x == 1:
			k = k - 1
			if k == 0:
				print(i)
				exit(0)
		i = i + 1
main()


k = int(input())
l = []
c = 0
i = 1
while c <= 10000:
	if sum(list(map(int, str(i)))) == 10:
		l.append(i)
		c += 1
	i += 9
print(l[k - 1])


def sumcheck(a):
	s = 0
	while a != 0:
		s += a % 10
		a = a // 10
	if s == 10:
		return True
	else:
		return False
k = int(input())
a = 19
count = 1
while count < k:
	a += 9
	if sumcheck(a):
		count += 1
print(a)


import sys
import math
import bisect
from sys import stdin, stdout
from math import gcd, floor, sqrt, log
from collections import defaultdict as dd
from bisect import bisect_left as bl, bisect_right as br
from collections import Counter
inp = lambda : int(input())
strng = lambda : input().strip()
jn = lambda x, l: x.join(map(str, l))
strl = lambda : list(input().strip())
mul = lambda : map(int, input().strip().split())
mulf = lambda : map(float, input().strip().split())
seq = lambda : list(map(int, input().strip().split()))
ceil = lambda x: int(x) if x == int(x) else int(x) + 1
ceildiv = lambda x, d: x // d if x % d == 0 else x // d + 1
flush = lambda : stdout.flush()
stdstr = lambda : stdin.readline()
stdint = lambda : int(stdin.readline())
stdpr = lambda x: stdout.write(str(x))
stdarr = lambda : map(int, stdstr().split())
mod = 1000000007

def sum(n):
	s = 0
	while n:
		s += n % 10
		n //= 10
	return s
k = stdint()
i = 19
while True:
	if sum(i) == 10:
		k -= 1
	if k == 0:
		print(i)
		break
	i += 1


n = int(input())
i = 9
arr = [19, 28, 37, 46, 55, 64, 73, 82, 91]
p = 2
while n > i:
	loc = 10 ** p
	for k in range(1, 10):
		j = 0
		arr.append(k * loc + 10 - k)
		while j < i:
			if arr[j] % 10 - k >= 0:
				arr.append(k * loc + arr[j] - k)
			j += 1
	i = len(arr)
	p += 1
print(arr[n - 1])


k = int(input())

def get_sum(n):
	s = 0
	l = n
	while l > 0 and s <= 10:
		r = l % 10
		s += r
		l = l // 10
	if not l == 0:
		return -1
	else:
		return s
j = 0
i = 18
while j < k:
	i += 1
	if get_sum(i) == 10:
		j += 1
print(i)


def fun(n):
	ans = 0
	while n:
		ans = ans + n % 10
		n = n // 10
	return ans
k = int(input())
ans = 19
while k > 1:
	ans += 9
	if fun(ans) == 10:
		k -= 1
print(ans)


ishod = int(input())
if ishod <= 5000:
	a = 10
	h = 0
	k = 0
	while h != ishod:
		a = a + 9
		z = a
		while z / 10 > 1 or z / 10 == 1:
			k = k + z % 10
			if k > 10:
				break
			z = z // 10
		k = k + z % 10
		if k == 10:
			h = h + 1
		k = 0
	print(a)
else:
	a = 10800109
	h = 0
	k = 0
	while h != 10001 - ishod:
		a = a - 9
		z = a
		while z / 10 > 1 or z / 10 == 1:
			k = k + z % 10
			if k > 10:
				break
			z = z // 10
		k = k + z % 10
		if k == 10:
			h = h + 1
		k = 0
	print(a)


import os
import re
import sys
from bisect import bisect, bisect_left, insort, insort_left
from collections import Counter, defaultdict, deque
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from io import BytesIO, IOBase
from itertools import accumulate, combinations, combinations_with_replacement, groupby, permutations, product
from math import acos, asin, atan, ceil, cos, degrees, factorial, hypot, log2, pi, radians, sin, sqrt, tan
from operator import itemgetter, mul
from string import ascii_lowercase, ascii_uppercase, digits

def inp():
	return int(input())

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

def instr():
	s = input()
	return list(s[:len(s)])

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

def sod(n):
	n = str(n)
	res = 0
	for d in n:
		res += int(d)
	return res

def main():
	k = inp()
	j = 0
	for i in range(19, 100000000000, 9):
		if sod(i) == 10:
			j += 1
		if j == k:
			print(i)
			break
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))

def input():
	return sys.stdin.readline().rstrip('\r\n')
main()


def cal(x):
	ans = 0
	while x:
		ans += x % 10
		x = x // 10
	return ans
n = int(input())
res = 19
n -= 1
while n:
	res += 9
	if cal(res) == 10:
		n -= 1
print(res)


def sum_of_digits(n):
	ans = 0
	while n != 0:
		ans += n % 10
		n = n // 10
	return ans
k = int(input())
ans = 19
while True:
	while sum_of_digits(ans) != 10:
		ans += 9
	k -= 1
	if k == 0:
		break
	ans += 9
print(ans)


def sum_of(n):
	s = 0
	while n > 0:
		s += n % 10
		n = n // 10
	return s
t = int(input())
x = 10
while t > 0:
	x += 9
	if sum_of(x) == 10:
		t -= 1
print(x)


def get_sum(x):
	ans = 0
	while x != 0:
		ans += x % 10
		x = x // 10
		if ans > 10:
			return ans
	return ans
k = int(input())
for i in range(19, 12000053, 9):
	s = get_sum(i)
	if s == 10:
		k -= 1
		if k == 0:
			print(i)
			break


n = int(input())
i = 1
num = 19
while i < n:
	num += 9
	s = 0
	q = int(num)
	while q > 0:
		s += q % 10
		q //= 10
	if s == 10:
		i += 1
print(num)


k = int(input())
N = 9
a = [0] * (N + 1)
i = N
while 1:
	if a[i] > 9:
		a[i] = 0
		i -= 1
		a[i] += 1
		continue
	s = sum(a)
	if s is 10:
		k -= 1
	if s < 10:
		i = N
	if s > 10:
		a[i] = 0
		i -= 1
	if not k:
		break
	a[i] += 1
print(int(''.join(map(str, a))))


def perfectNumbers(num):
	counter = 0
	per = 0
	while counter != num:
		counter += 1
		per += 1
		if sum_digits(per) > 10:
			counter -= 1
			per = per - per % 10 + 9
	per = int(str(per) + str(10 - sum_digits(per)))
	return print(per)

def sum_digits(n):
	s = 0
	while n:
		s += n % 10
		n //= 10
	return s
x = int(input())
perfectNumbers(x)


k = int(input())
combinations = []

def comb(n, rem, members):
	if n < 0 or rem < 0:
		return
	if n == 0:
		if sum(members) == 10 and members[0]:
			combinations.append(''.join(map(str, members)))
	for i in range(10):
		comb(n - 1, rem - i, members + [i])
for i in range(2, 9):
	comb(i, 10, [])
print(combinations[k - 1])


def sod(n):
	s = 0
	for i in str(n):
		s += int(i)
		if s > 10:
			break
	return s
from datetime import datetime
start = datetime.now()
s = 19
ans = []
ans1 = []
n = int(input())
cnt = 0
while n != cnt:
	if sod(s) == 10:
		ans.append(s)
		cnt += 1
	s = s + 9
print(ans[n - 1])


def sum_digit(x):
	ans = 0
	while x != 0:
		ans += x % 10
		if ans > 10:
			return ans
		x //= 10
	return ans

def perfect_number(k):
	cnt = 0
	for i in range(1, 30000000, 9):
		if sum_digit(i) == 10:
			cnt += 1
			if cnt == k:
				return i
k = int(input())
print(perfect_number(k))


k = int(input())
n = 19
while k > 1:
	n += 9
	(s, m) = (n, 0)
	while s > 0:
		m = m + s % 10
		s = s // 10
	if m == 10:
		k -= 1
print(n)


import random
import math
initial = 0

def perfact_number(k, digits, total):
	global initial
	if digits == 1:
		initial += 1
		if initial == k:
			return str(total)
		else:
			return None
	if total == 10:
		start = 1
		end = total - 1
	else:
		start = 0
		end = total
	for i in range(start, end + 1):
		m = perfact_number(k, digits - 1, total - i)
		if m != None:
			return str(i) + str(m)

def main():
	k = int(input())
	global initial
	c = 19
	rng = [0, 9, 63, 282, 996, 2997, 8001]
	if k > 8001:
		digit = 8
		initial = 8001
	else:
		for i in range(1, len(rng)):
			if k > rng[i - 1] and k <= rng[i]:
				digit = i + 1
				initial = rng[i - 1]
	p_n = perfact_number(k, digit, 10)
	print(p_n)
main()


k = int(input())

def somme(x):
	s = 0
	while x != 0:
		s += x % 10
		x = x // 10
	return s
h = 19
i = 0
while i != k:
	if somme(h) == 10:
		i += 1
		helpe = h
		h += 9
	else:
		h += 9
print(helpe)


from sys import stdin, stdout
import cProfile, math
from collections import Counter
printHeap = str()
test = False
memory_constrained = False

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

def test_print(output):
	if test:
		stdout.write(str(output) + '\n')

def display_list(list1, sep=' '):
	stdout.write(sep.join(map(str, list1)) + '\n')

def get_int():
	return int(stdin.readline().strip())

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

def get_list():
	return list(map(int, stdin.readline().split()))
memory = dict()

def clear_cache():
	global memory
	memory = dict()

def cached_fn(fn, *args):
	global memory
	if args in memory:
		return memory[args]
	else:
		result = fn(*args)
		memory[args] = result
		return result

def sumDigits(n):
	sum = 0
	while n != 0:
		sum += n % 10
		n = n // 10
	return sum

def main():
	k = get_int()
	a = 0
	for i in range(19, 1111111111111, 9):
		if sumDigits(i) == 10:
			a += 1
			if a == k:
				break
	display(i)
cProfile.run('main()') if test else main()


def check(x):
	ans = 0
	while x:
		ans += x % 10
		x //= 10
		if ans > 10:
			return False
	if ans == 10:
		return True
	return False
i = 19
cnt = 0
index = int(input())
while i:
	if check(i):
		cnt += 1
	if cnt == index:
		break
	i += 9
print(i)


from math import *
from copy import *
from string import *
from random import *
from sys import stdin
from sys import maxsize
from operator import *
from itertools import *
from collections import Counter
import math

def bin1(l, r, k, t, b, val, ans):
	if l > r:
		return ans
	else:
		mid = (l + r) // 2
		v = k ** mid
		if v == val:
			return v
		elif v > val:
			ans = mid
			return bin1(mid + 1, r, k, t, b, val, ans)
		else:
			return bin1(l, mid - 1, k, t, b, val, ans)

def bin2(l, r, k, t, b, val, ans):
	if l > r:
		return ans
	else:
		mid = (l + r) // 2
		v = t * k ** mid + b * mid
		if v == val:
			return v
		elif v > val:
			ans = mid
			return bin2(l, mid - 1, k, t, b, val, ans)
		else:
			return bin2(mid + 1, r, k, t, b, val, ans)

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

def bin(l, r, ll, val):
	if l > r:
		return -1
	else:
		mid = (l + r) // 2
		if val >= ll[mid][0] and val <= ll[mid][1]:
			return mid
		elif val < ll[mid][0]:
			return bin(l, mid - 1, ll, val)
		else:
			return bin(mid + 1, r, ll, val)

def deci(n):
	s = ''
	while n != 0:
		if n % 2 == 0:
			n = n // 2
			s = '0' + s
		else:
			n = n // 2
			s = '1' + s
	return s

def diff(s1, s2):
	if len(s1) < len(s2):
		v = len(s1)
		while v != len(s2):
			s1 = '0' + s1
			v = v + 1
	else:
		v = len(s2)
		while v != len(s1):
			s2 = '0' + s2
			v = v + 1
	c = 0
	for i in range(len(s1)):
		if s1[i:i + 1] != s2[i:i + 1]:
			c = c + 1
	return c
from sys import stdin, stdout

def fac(a, b):
	v = a
	while a != b:
		v *= a - 1
		a = a - 1
	return v

def bino(l, r, n):
	if l > r:
		return -1
	else:
		mid = (l + r) // 2
		val1 = math.log(n / mid + 1, 2)
		val2 = int(val1)
		if val1 == val2:
			return val1
		elif val1 < 1.0:
			return bino(l, mid - 1, n)
		else:
			return bino(mid + 1, r, n)

def binary(l, r, ll, val, ans):
	if l > r:
		return ans
	else:
		mid = (l + r) // 2
		if ll[mid] <= val:
			ans = mid + 1
			return binary(mid + 1, r, ll, val, ans)
		else:
			return binary(l, mid - 1, ll, val, ans)

def odd(n, ans, s):
	if n % 2 != 0 or n in s:
		return ans
	else:
		s.add(n)
		return odd(n // 2, ans + 1, s)
c = 0
val = 19
ans = int(input())
while True:
	n = val
	total = 0
	while n != 0:
		total += n % 10
		if total > 10:
			total = 12
			break
		n = n // 10
	if total == 10:
		c += 1
	if c == ans:
		print(val)
		break
	else:
		val += 1


def ten(x):
	a = 0
	while x:
		a += x % 10
		x //= 10
	if a == 10:
		return True
	else:
		return False

def main():
	n = int(input())
	an = 19
	while n:
		if ten(an):
			n -= 1
		an += 1
	print(an - 1)
main()


n = int(input())
cnt = 0
i = 1
while cnt < n:
	if sum(map(int, str(i))) == 10:
		cnt += 1
	if cnt == n:
		print(i)
	i += 9


rpta = []

def solve(pos, sum, arr):
	if sum > 10 or pos >= 9:
		return
	else:
		if sum == 10:
			rpta.append(arr)
		inicio = 0 if pos > 0 else 1
		for i in range(inicio, min(10, 10 - sum + 1)):
			solve(pos + 1, sum + i, arr * 10 + i)
k = input()
solve(0, 0, 0)
rpta.sort()
print(rpta[int(k) - 1])


def check(x):
	ans = 0
	while x:
		ans += x % 10
		x //= 10
	return ans
n = int(input())
now = 0
while n:
	now += 1
	if check(now) == 10:
		n -= 1
print(now)


k = int(input())
i = 10
while k:
	i += 9
	x = i
	j = 0
	while x > 0:
		j += x % 10
		if j > 10:
			break
		x //= 10
	if j == 10:
		k -= 1
print(i)


n = int(input())
i = 0
j = 0
while i < n:
	j = j + 1
	t = j
	sum1 = 0
	while t:
		sum1 = sum1 + t % 10
		t = t // 10
	if sum1 <= 10:
		r = str(str(j) + str(10 - sum1))
		i = i + 1
print(r)


def sum_int(n):
	s = 0
	while n:
		s += n % 10
		n //= 10
	return s
(k, n) = (int(input()), 10)
while k:
	n += 9
	if sum_int(n) == 10:
		k -= 1
print(n)


def f(x):
	s = 0
	while x:
		s += x % 10
		x //= 10
	return s
k = int(input())
i = 1
while k:
	i += 9
	if f(i) == 10:
		k -= 1
print(i)


def Sum(x):
	s = 0
	while x:
		s += x % 10
		x //= 10
	return s
n = int(input())
x = 19
while n > 1:
	x += 9
	if Sum(x) == 10:
		n -= 1
print(x)


def min_len_sum(m, s):
	a = [[]] * (m + 1)
	for i in range(m + 1):
		a[i] = ['-1'] * (s + 1)
	for j in range(min(s, 9) + 1):
		a[1][j] = str(j)
	for i in range(2, m + 1):
		a1 = a[i - 1]
		a0 = a[i]
		for j1 in range(1, s + 1):
			if a1[j1] == '-1':
				break
			for d in range(10):
				j = j1 + d
				if j > s:
					break
				new_val = a1[j1] + str(d)
				if a0[j] == '-1' or new_val < a0[j]:
					a0[j] = new_val
	return int(a[m][s])

def main():
	k = int(input()) - 1
	s = 10
	m = 8
	a = [[]] * (m + 1)
	for i in range(m + 1):
		a[i] = [0] * (s + 1)
	for j in range(min(s, 9) + 1):
		a[1][j] = 1
	for i in range(2, m + 1):
		a1 = a[i - 1]
		a0 = a[i]
		for j1 in range(1, s + 1):
			for d in range(10):
				j = j1 + d
				if j > s:
					break
				a0[j] += a1[j1]
	b = [0] * (m + 1)
	acc = 0
	for i in range(m + 1):
		acc += a[i][s]
		b[i] = acc
	while b[m] > k:
		m -= 1
	m += 1
	val = min_len_sum(m, s)
	counter = b[m - 1]
	ans = val
	while counter < k:
		val += 1
		if sum(map(int, str(val))) == s:
			ans = val
			counter += 1
	print(ans)
main()


k = int(input())
q = [0, 0, 9, 54, 219, 714, 2001, 5004, 11439]
n = 2
if k > 9:
	n = 3
if k > 9 + 54:
	n = 4
if k > 9 + 54 + 219:
	n = 5
if k > 9 + 54 + 219 + 714:
	n = 6
if k > 9 + 54 + 219 + 714 + 2001:
	n = 7
if k > 9 + 54 + 219 + 714 + 2001 + 5004:
	n = 8
if k > 9 + 54 + 219 + 714 + 2001 + 5004 + 11439:
	n = 9
for i in q:
	if k > i:
		k -= i
res = []
for i in range(n):
	res.append(0)
res[0] = 1
res[len(res) - 1] = 9
k -= 1
while k:
	k -= 1
	for j in range(len(res)):
		i = len(res) - j - 1
		if i == 0:
			break
		if res[i - 1] < 10 - sum(res[:i - 1]):
			res[i - 1] += 1
			for q in range(i, len(res)):
				res[q] = 0
			s = sum(res)
			res[len(res) - 1] = 10 - s
			break
for i in res:
	print(i, end='')


def f(n):
	sum = 0
	while n:
		sum += n % 10
		n //= 10
	return sum
k = int(input())
n = 10
while k > 0:
	n += 9
	if f(n) == 10:
		k -= 1
print(n)


n = int(input())
perfect = []

def dfs(dig, rm):
	if dig == 0:
		return [rm]
	if rm == 0:
		return [0]
	elif dig == 1 and rm == 10:
		tmp = []
		for i in range(1, 10):
			for j in dfs(dig - 1, rm - i):
				num = j + i * 10 ** dig
				tmp.append(num)
		return tmp
	else:
		tmp = []
		for i in range(rm + 1):
			if i == 10:
				break
			for j in dfs(dig - 1, rm - i):
				num = j + i * 10 ** dig
				tmp.append(num)
		return tmp
for num in dfs(7, 10):
	perfect.append(num)
print(perfect[n - 1])


def sum_digits(num):
	digits = str(num)
	sum = 0
	n_digits = len(digits)
	for i in range(n_digits):
		sum += int(digits[i])
	return sum
n = int(input())
partitions = [(1, 19), (1000, 100036), (2000, 220033), (3000, 1000027), (4000, 1120024), (5000, 2000008), (6000, 2230003), (7000, 3311020), (8000, 9010000), (9000, 10116100), (10000, 10800100)]
for p in partitions:
	if n >= p[0]:
		(k, i) = (p[0], p[1])
ans = i
if k != n:
	while k < n:
		i += 9
		sum = sum_digits(i)
		if sum == 10:
			ans = i
			k += 1
print(str(ans))


import functools

def C(n, k):
	if k > n:
		return 0
	if n - k < k:
		k = n - k
	result = 1
	for (denominator, enumerator) in enumerate(range(n - k + 1, n + 1), 1):
		result = result * enumerator // denominator
	return result

def maths_attempt():

	def of_length(n):
		return C(10 - 1 + (n - 1), n - 1) - 1
	k = int(input())
	l = 2
	while True:
		n = of_length(l)
		if n >= k:
			break
		k -= n
		l += 1
	res = 10 ** (l - 1) + 9
	max_digit = 1
	while k > 1:
		for digit in range(max_digit):
			m = 10 ** (max_digit + 1)
			a = 9 * 10 ** max_digit
			while res % m != 0 and k > 1:
				res += a
				k -= 1
			max_digit += 1
	print(res)

def partitions(n, k):
	return C(n + k - 1, n)

def perfect_numbers(n):
	assert partitions(10 - 1, n) - 1 == C(10 - 1 + (n - 1), n - 1) - 1
	return partitions(10 - 1, n) - 1

def dp_attempt():
	k = int(input())
	print(dp_method(k))

def dp_method(k):

	@functools.lru_cache(maxsize=None)
	def get(length, digit_sum):
		if length == 0:
			return 1 if digit_sum == 0 else 0
		if digit_sum == 0:
			return 1
		res = 0
		for digit in range(1, 10) if digit_sum == 10 else range(digit_sum + 1):
			res += get(length - 1, digit_sum - digit)
		return res
	length = 2
	while True:
		of_length = get(length, 10)
		if k <= of_length:
			break
		k -= of_length
		length += 1
	digits = [0] * length
	digit_sum = 0
	for digit_index in range(length):
		for digit in range(1 if digit_index == 0 else 0, 10):
			of_length = get(length - digit_index - 1, 10 - digit_sum - digit)
			if k <= of_length:
				digits[digit_index] = digit
				digit_sum += digit
				break
			k -= of_length
	res = 0
	for digit in digits:
		res = 10 * res + digit
	return res

def super_sanity():
	expected = (n for n in range(1, 10000000) if sum(map(int, str(n))) == 10)
	result = (dp_method(n) for n in range(1, 10001))
	for (e, r) in zip(expected, result):
		if e != r:
			print(e, '!=', r)
dp_attempt()


def dig(x):
	s = 0
	while x != 0:
		s += x % 10
		x = x // 10
	return s
k = int(input())
i = 0
while k != 0:
	i += 1
	if dig(i) == 10:
		k -= 1
print(i)


def digitsum(number):
	NumberSt = str(number)
	digitsum = 0
	for char in NumberSt:
		digitsum += int(char)
		if digitsum > 10:
			break
	return digitsum
k = int(input())
count = 0
i = 10
while count != k:
	i += 9
	if digitsum(i) == 10:
		count += 1
print(i)


def f(x):
	ans = 0
	while x:
		ans += x % 10
		x //= 10
	return ans
n = int(input())
su = 0
while n > 0:
	su += 1
	if f(su) == 10:
		n -= 1
print(su)


def fun(n):
	t = 0
	while n:
		t += n % 10
		n = n // 10
	return t == 10
n = int(input())
ans = 0
while n:
	ans += 1
	if fun(ans):
		n -= 1
print(ans)


k = int(input())

def perfect_sum_10(func_input):
	start = 19
	counter = 0
	while True:
		summation = 0
		temp = start
		while temp > 0:
			summation += temp % 10
			temp //= 10
		if summation == 10:
			counter += 1
		if counter == func_input:
			return start
		start += 9
	return -1
digit = perfect_sum_10(k)
print(digit)


k = int(input())
number = 19
l = []
while len(l) != k:
	if sum(list(map(int, list(str(number))))) == 10:
		l.append(number)
		number += 9
	else:
		number += 9
print(l[k - 1])


import sys
import math
input = sys.stdin.readline

def inp():
	return int(input())

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

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
k = inp()
i = 19

def digit(n):
	ans = 0
	while n:
		ans += n % 10
		n //= 10
	return ans == 10
while k:
	if digit(i):
		k -= 1
	i += 1
print(i - 1)


def sum_of_digits(n):
	s = 0
	while n:
		s += n % 10
		n = n // 10
	return s
n = int(input())
i = 0
while n:
	i += 1
	if sum_of_digits(i) == 10:
		n -= 1
print(i)


n = int(input())
c = 19
while n > 1:
	c += 9
	if sum(map(int, str(c))) == 10:
		n -= 1
print(c)


n = int(input())
count = 0
value = 1
while count < n:
	value += 9
	if sum(list(map(int, str(value)))) == 10:
		count += 1
print(value)


def sum(z):
	su = 0
	for i in range(len(str(z))):
		su += z % 10
		z = z // 10
	return su
n = int(input())
(count, i) = (0, 19)
while count != n:
	if sum(i) == 10:
		count += 1
	i += 1
print(i - 1)


def total(x):
	total = 0
	while x:
		total += x % 10
		x //= 10
	return total
n = int(input())
x = 19
while n > 1:
	x += 9
	if total(x) == 10:
		n -= 1
print(x)


k = int(input()) - 1
ans = [1, 9]
for i in range(k):
	j = len(ans) - 1
	while j > 0 and ans[j] == 0:
		j -= 1
	if ans[j - 1] == 9:
		ans[j] = 0
		ans[j - 1] = 1
		ans.append(9)
	else:
		w = ans[j]
		ans[j] = 0
		ans[-1] = w - 1
		ans[j - 1] += 1
print(*ans, sep='')


import math

def sum_num(num):
	summary = 0
	while num > 0:
		summary += num % 10
		num //= 10
	return summary

def solve():
	k = int(input())
	num = 19
	while k - 1 > 0:
		num += 9
		if sum_num(num) == 10:
			k -= 1
	return num
print(solve())


def sum_of_numbers(n):
	s = 0
	while n > 0:
		s += n % 10
		n = n // 10
	return s
n = int(input())
t = 0
r = 19
while t != n:
	if sum_of_numbers(r) == 10:
		t += 1
	x = r
	r += 9
print(x)


def digit(x):
	t = 0
	while x:
		t += x % 10
		x = x // 10
	return t
k = int(input())
x = 19
while k > 1:
	x = x + 9
	if digit(x) == 10:
		k -= 1
print(x)


k = int(input())
n = 10
while k > 0:
	if k > 5000:
		if k > 7500:
			if k > 8750:
				k -= 8750
				n = 10100431
				n += 9
				s = 0
				for i in range(len(str(n))):
					s += int(str(n)[i])
					if s > 10:
						break
				if s == 10:
					k -= 1
			else:
				k -= 7500
				n = 4301200
				n += 9
				s = 0
				for i in range(len(str(n))):
					s += int(str(n)[i])
					if s > 10:
						break
				if s == 10:
					k -= 1
		else:
			k -= 5000
			n = 2000008
			n += 9
			s = 0
			for i in range(len(str(n))):
				s += int(str(n)[i])
				if s > 10:
					break
			if s == 10:
				k -= 1
	else:
		n += 9
		s = 0
		for i in range(len(str(n))):
			s += int(str(n)[i])
			if s > 10:
				break
		if s == 10:
			k -= 1
print(n)


n = int(input())
a = 10
while n:
	a += 9
	if sum(map(int, str(a))) == 10:
		n -= 1
print(a)


k = int(input().strip())
num = [8, 1]
s = sum(num)
count = 0
while count < k:
	num[0] += 1
	s += 1
	if num[0] >= 10 or s > 10:
		for (i, d) in enumerate(num):
			if d >= 10 or s > 10:
				num[i] = 0
				if i == len(num) - 1:
					num.append(1)
				else:
					num[i + 1] += 1
				s = s + 1 - d
	if s == 10:
		count += 1
		if count == k:
			print(''.join(map(str, reversed(num))))


def cnt(n):
	sum = 0
	while n:
		sum += n % 10
		n //= 10
	return sum
t = int(input())
count = 0
for i in range(19, 11000000, 9):
	if cnt(i) == 10:
		count += 1
		if count == t:
			print(i)
			break


import atexit
import io
import sys
_INPUT_LINES = sys.stdin.read().splitlines()
input = iter(_INPUT_LINES).__next__
_OUTPUT_BUFFER = io.StringIO()
sys.stdout = _OUTPUT_BUFFER

@atexit.register
def write():
	sys.__stdout__.write(_OUTPUT_BUFFER.getvalue())
k = int(input())
c = 0
count = 0
i = 1
while True:
	temp = i
	s = 0
	while temp > 0:
		d = temp % 10
		s = s + d
		temp = temp // 10
	if s == 10:
		count = count + 1
		j = i
	if count == k:
		break
	i = i + 1
print(j)


n = int(input())
mk = 10
n1 = mk
c = 0
while c != n:
	d = 0
	while mk:
		d = d + mk % 10
		mk = mk // 10
	if d == 10:
		c = c + 1
	n1 = n1 + 9
	mk = n1
print(mk - 9)


n = int(input())

def sum(nn):
	su = 0
	while nn // 1:
		su += nn % 10
		nn /= 10
		nn = int(nn)
	return su
k = 0
nu = 1
while k < n:
	if sum(nu) == 10:
		k += 1
	if k == n:
		print(nu)
	nu += 9


def isSum10(num):
	summ = 0
	while num:
		summ += num % 10
		num = num // 10
	if summ == 10:
		return True
	else:
		return False
num = int(input())
i = 19
while num > 1:
	i += 9
	if isSum10(i):
		num -= 1
print(i)


import math
n = int(input())
result = 19
i = 1
while i < n:
	result += 9
	sum_ = sum([int(e) for e in str(result)])
	while sum_ != 10:
		result += 9
		sum_ = sum([int(e) for e in str(result)])
	i += 1
print(result)


def sumDigits(n):
	sum = 0
	while n != 0:
		sum += n % 10
		n = n // 10
	return sum
k = int(input())
a = 0
for i in range(19, 1111111111111, 9):
	if sumDigits(i) == 10:
		a += 1
		if a == k:
			break
print(i)


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

def fi():
	return float(input())

def si():
	return input()

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

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

def su(n):
	s = 0
	while n != 0:
		a = n % 10
		s += a
		n //= 10
	return s
n = ii()
(i, j) = (10, 0)
while j != n:
	i += 9
	if su(i) == 10:
		j += 1
print(i)


def test(number):
	total_sum = 0
	while number > 0:
		total_sum = total_sum + int(number % 10)
		if total_sum > 10:
			break
		number = int(number / 10)
	return total_sum
num = int(input())
x = 19
while num > 1:
	x += 9
	if test(x) == 10:
		num -= 1
print(x)


import sys

def input():
	return sys.stdin.readline()[:-1]
k = int(input())

def f(x):
	s = 0
	while x:
		s += x % 10
		x //= 10
	return s == 10
for i in range(19, 20000000):
	if f(i):
		k -= 1
	if k == 0:
		print(i)
		exit()


k = int(input())
res = []

def enum_perfect(digitsum, pos, num_len):
	global k
	if pos == num_len + 1:
		if digitsum > 0:
			return False
		k -= 1
		return k == 0
	max_digit = min(9, digitsum)
	options = range(max_digit + 1) if pos > 1 else range(1, max_digit + 1)
	for digit in options:
		if enum_perfect(digitsum - digit, pos + 1, num_len):
			res.append(digit)
			return True
num_len = 2
while True:
	if enum_perfect(10, 1, num_len):
		break
	num_len += 1
print(''.join(map(str, res[::-1])))


def gen(x, digits, summ):
	if summ < 0:
		return
	if digits == 1:
		if summ < 10:
			a.append(x * 10 + summ)
		return
	if x != 0:
		gen(x * 10, digits - 1, summ)
	for d in range(1, 10):
		gen(x * 10 + d, digits - 1, summ - d)
a = []
for digits in range(2, 9):
	gen(0, digits, 10)
a.sort()
k = int(input())
print(a[k - 1])


def findNth(n):
	count = 0
	curr = 19
	while True:
		sum = 0
		x = curr
		while x > 0:
			sum = sum + x % 10
			x = int(x / 10)
		if sum == 10:
			count += 1
		if count == n:
			return curr
		curr += 9
	return -1
print(findNth(int(input())))


h = []

def f(k, s):
	if s < 0:
		return 0
	if s == 0:
		return 1
	if k < 10:
		return 1 if s <= k else 0
	k = str(k)
	ret = sum((h[len(k) - 1][s - i] if s - i >= 0 else 0 for i in range(int(k[0]))))
	return ret + f(int(k[1:]), s - int(k[0]))

def main(args):
	h.append([])
	h.append([1 if s <= 9 else 0 for s in range(11)])
	for m in range(2, 10):
		h.append([sum(h[m - 1][1 if s == 10 else 0:s + 1]) for s in range(11)])
	k = int(input())
	ans = 0
	for i in range(32, -1, -1):
		if f(ans + 2 ** i, 10) < k:
			ans += 2 ** i
	ans += 1
	print(ans)
import sys
sys.exit(main(sys.argv))


def sum_digits3(n):
	r = 0
	while n:
		(r, n) = (r + n % 10, n // 10)
	return r
n = int(input())
ans = 10
for i in range(n):
	while True:
		ans += 9
		if sum_digits3(ans) == 10:
			break
print(ans)


(n, s) = (int(input()), 0)
c = 0
for i in range(19, 1000000001):
	x = i
	s = 0
	while x > 0:
		s += x % 10
		x = x // 10
	if s == 10:
		c += 1
	if c == n:
		print(i)
		break


k = int(input())
p = 19
while k > 1:
	x = p
	s = 0
	while x > 0:
		s += x % 10
		x //= 10
	if s == 10:
		k -= 1
	p += 9
while True:
	x = p
	s = 0
	while x > 0:
		s += x % 10
		x //= 10
	if s == 10:
		f = 1
		break
	p += 9
print(p)


def findSum(num, s=0):
	s += num % 10
	num = num // 10
	if not num:
		return s
	return findSum(num, s)

def findNext(num):
	if findSum(num + 9) == 10:
		return num + 9
	string = ''
	num = list(str(num))
	length = len(num)
	total = 0
	for i in range(length):
		total += int(num[i])
		if total >= 10:
			break
	for t in range(i - 1, -1, -1):
		if num[t] != '9':
			break
	else:
		return int('1' + '0' * (length - 1) + '9')
	for t in range(i - 1, -1, -1):
		if num[t] != '9':
			num[t] = chr(ord(num[t]) + 1)
			break
	for j in range(t + 1, length - 1):
		num[j] = '0'
	total = 0
	for i in range(t + 1):
		total += int(num[i])
	num[-1] = str((10 - total) % 10)
	return int(''.join(num))
n = int(input().strip())
if n == 1:
	print(19)
else:
	t = 19
	for i in range(n - 1):
		t = findNext(t)
	print(t)


n = int(input())
num = 1
i = 0
while i < n:
	num = num + 9
	tmp_1 = num
	tmp_2 = 0
	while tmp_1 > 0:
		tmp_2 += tmp_1 % 10
		tmp_1 = tmp_1 // 10
	if tmp_2 == 10:
		i += 1
print(num)


def add(k):
	c = 0
	while k:
		c += k % 10
		k //= 10
	return c
k = int(input())
a = 19
while k > 1:
	a += 9
	if add(a) == 10:
		k -= 1
print(a)


def y(x):
	t = 0
	while x:
		t = t + x % 10
		x = x // 10
	return t
n = int(input())
z = 19
while n > 1:
	z = z + 9
	if y(z) == 10:
		n = n - 1
print(z)


def hitung(x):
	hasil = 0
	while x:
		hasil += x % 10
		x //= 10
	return hasil
n = int(input())
temp = 0
while n:
	temp += 1
	if hitung(temp) == 10:
		n -= 1
print(temp)


k = int(input())
i = 10
while k:
	i += 9
	if 10 == sum(map(int, str(i))):
		k -= 1
print(i)


k = int(input())
for a1 in range(10):
	for a2 in range(10):
		if a1 + a2 > 10:
			break
		for a3 in range(10):
			if a1 + a2 + a3 > 10:
				break
			for a4 in range(10):
				if a1 + a2 + a3 + a4 > 10:
					break
				for a5 in range(10):
					if a1 + a2 + a3 + a4 + a5 > 10:
						break
					for a6 in range(10):
						if a1 + a2 + a3 + a4 + a5 + a6 > 10:
							break
						for a7 in range(10):
							if a1 + a2 + a3 + a4 + a5 + a6 + a7 > 10:
								break
							for a8 in range(10):
								if a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8 > 10:
									break
								if a1 + a2 + a3 + a4 + a5 + a6 + a7 + a8 == 10:
									k -= 1
									if k == 0:
										print(int(''.join(map(str, [a1, a2, a3, a4, a5, a6, a7, a8]))))
										exit()


def next(x):
	x = list(x)
	r = -1
	while r >= -len(x) and x[r] == '0':
		r -= 1
	x[r] = chr(ord(x[r]) - 1)
	r -= 1
	while r > -len(x) - 1 and x[r] == '9':
		r -= 1
	if r == -len(x) - 1:
		y = ['1'] + ['0'] * (len(x) - 1) + ['9']
		return y
	x[r] = str(int(x[r]) + 1)
	x[len(x) + r + 1:] = ['0'] * abs(r + 1)
	s = sum([int(z) for z in x])
	x[-1] = str(10 - s + int(x[-1]))
	return x
x = ['1', '9']
k = int(input())
for i in range(k - 1):
	x = next(x)
print(''.join(x))


def cal(n):
	ans = 0
	while n:
		ans += n % 10
		n = n // 10
	return ans
n = int(input())
now = 10
while n:
	now += 9
	if cal(now) == 10:
		n -= 1
print(now)


def sum(i):
	ret = 0
	while i:
		ret += i % 10
		i //= 10
	return ret
k = int(input())
i = 0
while k:
	k -= sum(i) == 10
	i += 1
print(i - 1)


def s(m):
	a = 0
	while m:
		a += m % 10
		m //= 10
	return a
n = int(input())
x = 10
while n:
	x += 9
	if s(x) == 10:
		n -= 1
print(x)


def sum_digits(y):
	total = 0
	while y > 0:
		total += y % 10
		y //= 10
	return total

def perfect_number(x):
	start = 19
	times = 1
	while times < x:
		start += 9
		if sum_digits(start) == 10:
			times += 1
	return start
print(perfect_number(int(input())))


def s(n):
	n = str(n)
	ans = 0
	for char in n:
		ans += int(char)
	return ans
winners = []
n = int(input())
found = 0
it = 1
while found < n:
	if s(it) == 10:
		found += 1
		winners.append(it)
	it += 9
print(winners[-1])


import sys
import collections

def sm(n):
	ans = 0
	while n:
		ans += n % 10
		n //= 10
	return ans
ans = 0
k = int(input().strip())
while k:
	ans += 1
	if sm(ans) == 10:
		k -= 1
print(ans)


i = 10
c = 0
k = int(input())
while 1:
	i += 9
	n = sum(map(int, str(i)))
	if n == 10:
		c += 1
	if c == k:
		ans = i
		break
print(ans)


def dig_sum(num):
	s = 0
	while num > 0:
		s += num % 10
		num //= 10
	return s
k = int(input())
(i, happy) = (10, 19)
while k > 0:
	if dig_sum(i) == 10:
		happy = i
		k -= 1
	i += 9
print(happy)


(K, Number) = (int(input()), 10)
while K:
	Number += 9
	if sum(map(int, str(Number))) == 10:
		K -= 1
print(Number)


def sumofdig(a):
	b = str(a)
	alst = list()
	for i in b:
		alst.append(int(i))
		c = sum(alst)
	return c
n = int(input())
p = 0
start = 10
while p < n:
	start = start + 9
	if sumofdig(start) == 10:
		p = p + 1
print(start)


def d():
	k = int(input())
	firstNum = 19
	l = 1
	while l < k:
		firstNum += 9
		tmp_num = firstNum
		summ = 0
		while tmp_num != 0:
			summ += tmp_num % 10
			tmp_num = tmp_num // 10
			if summ > 10:
				break
		if summ != 10:
			continue
		l += 1
	print(firstNum)
d()


def sumofdigits(a):
	s = 0
	while a != 0:
		s += a % 10
		a //= 10
	return s
k = int(input())
x = 10
while k != 0:
	if sumofdigits(x + 9) == 10:
		x += 9
		k -= 1
	else:
		x += 9
print(x)


k = int(input())
count = 0

def sc(n):
	global count
	res = 0
	while n > 0:
		res += n % 10
		n = n // 10
		if res > 10:
			break
	if res == 10:
		count += 1
i = 10
while k != count:
	i += 9
	sc(i)
print(i)


def somme(n):
	s = 0
	while n > 0:
		s += n % 10
		n = n // 10
	return s
k = int(input())
position = 0
perfect = 19
while position != k:
	if somme(perfect) == 10:
		position = position + 1
		perfect = perfect + 9
	else:
		perfect = perfect + 9
print(perfect - 9)


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 power(a, n):
	r = 1
	while n:
		if n & 1:
			r = r * a
		a *= a
		n = n >> 1
	return r

def degsum(n):
	c = 0
	while n:
		c += n % 10
		n //= 10
	return c

def solve():
	n = int(input())
	a = 19
	c = 1
	while c != n:
		a += 9
		if degsum(a) == 10:
			c += 1
	print(a)
for _ in range(1):
	solve()


perfects = []
for a in range(1, 10):
	perfects.append('{}{}'.format(a, 10 - a))
	for b in range(11 - a):
		if a + b <= 10:
			perfects.append('{}{}{}'.format(a, b, 10 - a - b))
		for c in range(11 - a - b):
			if a + b + c <= 10:
				perfects.append('{}{}{}{}'.format(a, b, c, 10 - a - b - c))
			for d in range(11 - a - b - c):
				if a + b + c + d <= 10:
					perfects.append('{}{}{}{}{}'.format(a, b, c, d, 10 - a - b - c - d))
				for e in range(11 - a - b - c - d):
					if a + b + c + d + e <= 10:
						perfects.append('{}{}{}{}{}{}'.format(a, b, c, d, e, 10 - a - b - c - d - e))
					for f in range(11 - a - b - c - d - e):
						if a + b + c + d + e + f <= 10:
							perfects.append('{}{}{}{}{}{}{}'.format(a, b, c, d, e, f, 10 - a - b - c - d - e - f))
						for g in range(11 - a - b - c - d - e - f):
							if a + b + c + d + e + f + g <= 10:
								perfects.append('{}{}{}{}{}{}{}{}'.format(a, b, c, d, e, f, g, 10 - a - b - c - d - e - f - g))
perfects = sorted([int(x) for x in perfects])
print(perfects[int(input()) - 1])


class Solution(object):

	def __init__(self):
		pass

	def sol(self, k):
		return self.build_number(10, 0, 0, k)[1]

	def build_number(self, idx, sm, number, k):
		if idx == 0:
			if sm == 10:
				return (1, number if k == 1 else 0)
			return (0, 0)
		inc = 0
		for i in range(0, 10):
			if sm + i <= 10:
				r = self.build_number(idx - 1, sm + i, number * 10 + i, k - inc)
				inc += r[0]
				if r[1] != 0:
					return r
		return (inc, 0)

def main():
	sol = Solution()
	k = int(input())
	print(sol.sol(k))
	return 0
main()


def k_the_func(k):
	counter = 0
	init_val = 19
	while True:
		total = 0
		k_val = init_val
		while k_val > 0:
			total = total + k_val % 10
			k_val = k_val // 10
		if total == 10:
			counter += 1
		if counter == k:
			return init_val
		init_val += 9
	return -1
k = int(input())
print(k_the_func(k))


k = int(input())

def fun(n):
	ans = 19
	i = 1
	while i < n:
		s = 0
		ans += 9
		current = ans
		while current > 0:
			s += current % 10
			current = current // 10
		if s == 10:
			i += 1
	return ans
print(fun(k))


import sys

def main():
	pass

def binary(n):
	return bin(n).replace('0b', '')

def decimal(s):
	return int(s, 2)

def pow2(n):
	p = 0
	while n > 1:
		n //= 2
		p += 1
	return p

def isPrime(n):
	if n == 1:
		return False
	else:
		root = int(n ** 0.5)
		root += 1
		for i in range(2, root):
			if n % i == 0:
				return False
		return True

def lts(l):
	s = ''.join(map(str, l))
	return s

def stl(s):
	l = list(s)
	return l

def sq(a, target, arr=[]):
	s = sum(arr)
	if s == target:
		return arr
	if s >= target:
		return
	for i in range(len(a)):
		n = a[i]
		remaining = a[i + 1:]
		ans = sq(remaining, target, arr + [n])
		if ans:
			return ans

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

def nCr(n, r):
	f = math.factorial
	return f(n) // f(r) // f(n - r)
mod = int(1000000000.0) + 7

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

def iinp():
	return int(input())

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

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

def p(xyz):
	print(xyz)

def p2(a, b):
	print(a, b)
import math
k = iinp()
cnt = 0
for i in range(19, 100000000, 9):
	nos = i
	s = 0
	while nos != 0:
		s = s + nos % 10
		nos = nos // 10
	if s == 10:
		cnt += 1
	if cnt == k:
		p(i)
		exit()


import sys
from functools import lru_cache, cmp_to_key
from heapq import merge, heapify, heappop, heappush
from math import *
from collections import defaultdict as dd, deque, Counter as C
from itertools import combinations as comb, permutations as perm
from bisect import bisect_left as bl, bisect_right as br, bisect, insort
from time import perf_counter
from fractions import Fraction
import copy
from copy import deepcopy
import time
starttime = time.time()
mod = int(pow(10, 9) + 7)
mod2 = 998244353

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

def out(*var, end='\n'):
	sys.stdout.write(' '.join(map(str, var)) + end)

def L():
	return list(sp())

def sl():
	return list(ssp())

def sp():
	return map(int, data().split())

def ssp():
	return map(str, data().split())

def l1d(n, val=0):
	return [val for i in range(n)]

def l2d(n, m, val=0):
	return [l1d(n, val) for j in range(m)]
try:
	sys.stdin = open('input.txt', 'r')
except:
	pass

def pmat(A):
	for ele in A:
		print(*ele, end='\n')
k = L()[0]
A = []
i = 19
while len(A) != k:
	x = list(str(i))
	if sum((int(ele) for ele in x)) == 10:
		A.append(i)
	i += 9
print(A[-1])
endtime = time.time()


def Check(dp):
	temp = dp
	summ = 0
	while temp > 0:
		summ += temp % 10
		temp = temp // 10
	return summ == 10
m = int(input())
dp = 19
while m > 1:
	dp = dp + 9
	temp = dp
	if Check(dp):
		m = m - 1
print(dp)


count = 0
a = []
b = 10
m = int(input())

def sum_digits(n):
	s = 0
	while n:
		s += n % 10
		n //= 10
	return s
while 1:
	if sum_digits(b) == 10:
		count = count + 1
		a.append(b)
	if count == m:
		print(b)
		break
	b = b + 1


k = int(input())
l = [19, 37, 55, 73, 91, 118, 136, 154, 172, 190, 217, 235, 253, 271, 307, 325, 343, 361, 406, 424, 442, 460, 514, 532, 550, 613, 631, 703, 721, 802, 820, 910, 1018, 1036, 1054, 1072, 1090, 1117, 1135, 1153, 1171, 1207, 1225, 1243, 1261, 1306, 1324, 1342, 1360, 1414, 1432, 1450, 1513, 1531, 1603, 1621, 1702, 1720, 1810, 2008, 2026, 2044, 2062, 2080, 2116, 2134, 2152, 2170, 2215, 2233, 2251, 2305, 2323, 2341, 2404, 2422, 2440, 2512, 2530, 2611, 2701, 2800, 3016, 3034, 3052, 3070, 3115, 3133, 3151, 3205, 3223, 3241, 3304, 3322, 3340, 3412, 3430, 3511, 3601, 3700, 4015, 4033, 4051, 4105, 4123, 4141, 4204, 4222, 4240, 4312, 4330, 4411, 4501, 4600, 5014, 5032, 5050, 5113, 5131, 5203, 5221, 5302, 5320, 5410, 6004, 6022, 6040, 6112, 6130, 6211, 6301, 6400, 7012, 7030, 7111, 7201, 7300, 8011, 8101, 8200, 9010, 10009, 10027, 10045, 10063, 10081, 10108, 10126, 10144, 10162, 10180, 10216, 10234, 10252, 10270, 10315, 10333, 10351, 10405, 10423, 10441, 10504, 10522, 10540, 10612, 10630, 10711, 10801, 10900, 11017, 11035, 11053, 11071, 11107, 11125, 11143, 11161, 11206, 11224, 11242, 11260, 11314, 11332, 11350, 11413, 11431, 11503, 11521, 11602, 11620, 11710, 12007, 12025, 12043, 12061, 12106, 12124, 12142, 12160, 12214, 12232, 12250, 12313, 12331, 12403, 12421, 12502, 12520, 12610, 13006, 13024, 13042, 13060, 13114, 13132, 13150, 13213, 13231, 13303, 13321, 13402, 13420, 13510, 14005, 14023, 14041, 14104, 14122, 14140, 14212, 14230, 14311, 14401, 14500, 15013, 15031, 15103, 15121, 15202, 15220, 15310, 16003, 16021, 16102, 16120, 16210, 17002, 17020, 17110, 18001, 18100, 20008, 20026, 20044, 20062, 20080, 20116, 20134, 20152, 20170, 20215, 20233, 20251, 20305, 20323, 20341, 20404, 20422, 20440, 20512, 20530, 20611, 20701, 20800, 21016, 21034, 21052, 21070, 21115, 21133, 21151, 21205, 21223, 21241, 21304, 21322, 21340, 21412, 21430, 21511, 21601, 21700, 22015, 22033, 22051, 22105, 22123, 22141, 22204, 22222, 22240, 22312, 22330, 22411, 22501, 22600, 23014, 23032, 23050, 23113, 23131, 23203, 23221, 23302, 23320, 23410, 24004, 24022, 24040, 24112, 24130, 24211, 24301, 24400, 25012, 25030, 25111, 25201, 25300, 26011, 26101, 26200, 27010, 28000, 30016, 30034, 30052, 30070, 30115, 30133, 30151, 30205, 30223, 30241, 30304, 30322, 30340, 30412, 30430, 30511, 30601, 30700, 31015, 31033, 31051, 31105, 31123, 31141, 31204, 31222, 31240, 31312, 31330, 31411, 31501, 31600, 32014, 32032, 32050, 32113, 32131, 32203, 32221, 32302, 32320, 32410, 33004, 33022, 33040, 33112, 33130, 33211, 33301, 33400, 34012, 34030, 34111, 34201, 34300, 35011, 35101, 35200, 36010, 37000, 40015, 40033, 40051, 40105, 40123, 40141, 40204, 40222, 40240, 40312, 40330, 40411, 40501, 40600, 41014, 41032, 41050, 41113, 41131, 41203, 41221, 41302, 41320, 41410, 42004, 42022, 42040, 42112, 42130, 42211, 42301, 42400, 43012, 43030, 43111, 43201, 43300, 44011, 44101, 44200, 45010, 46000, 50014, 50032, 50050, 50113, 50131, 50203, 50221, 50302, 50320, 50410, 51004, 51022, 51040, 51112, 51130, 51211, 51301, 51400, 52012, 52030, 52111, 52201, 52300, 53011, 53101, 53200, 54010, 55000, 60013, 60031, 60103, 60121, 60202, 60220, 60310, 61003, 61021, 61102, 61120, 61210, 62002, 62020, 62110, 63001, 63100, 70003, 70021, 70102, 70120, 70210, 71002, 71020, 71110, 72001, 72100, 80002, 80020, 80110, 81001, 81100, 90001, 90100, 100009, 100027, 100045, 100063, 100081, 100108, 100126, 100144, 100162, 100180, 100216, 100234, 100252, 100270, 100315, 100333, 100351, 100405, 100423, 100441, 100504, 100522, 100540, 100612, 100630, 100711, 100801, 100900, 101017, 101035, 101053, 101071, 101107, 101125, 101143, 101161, 101206, 101224, 101242, 101260, 101314, 101332, 101350, 101413, 101431, 101503, 101521, 101602, 101620, 101710, 102007, 102025, 102043, 102061, 102106, 102124, 102142, 102160, 102214, 102232, 102250, 102313, 102331, 102403, 102421, 102502, 102520, 102610, 103006, 103024, 103042, 103060, 103114, 103132, 103150, 103213, 103231, 103303, 103321, 103402, 103420, 103510, 104005, 104023, 104041, 104104, 104122, 104140, 104212, 104230, 104311, 104401, 104500, 105013, 105031, 105103, 105121, 105202, 105220, 105310, 106003, 106021, 106102, 106120, 106210, 107002, 107020, 107110, 108001, 108100, 110008, 110026, 110044, 110062, 110080, 110116, 110134, 110152, 110170, 110215, 110233, 110251, 110305, 110323, 110341, 110404, 110422, 110440, 110512, 110530, 110611, 110701, 110800, 111016, 111034, 111052, 111070, 111115, 111133, 111151, 111205, 111223, 111241, 111304, 111322, 111340, 111412, 111430, 111511, 111601, 111700, 112015, 112033, 112051, 112105, 112123, 112141, 112204, 112222, 112240, 112312, 112330, 112411, 112501, 112600, 113014, 113032, 113050, 113113, 113131, 113203, 113221, 113302, 113320, 113410, 114004, 114022, 114040, 114112, 114130, 114211, 114301, 114400, 115012, 115030, 115111, 115201, 115300, 116011, 116101, 116200, 117010, 118000, 120016, 120034, 120052, 120070, 120115, 120133, 120151, 120205, 120223, 120241, 120304, 120322, 120340, 120412, 120430, 120511, 120601, 120700, 121015, 121033, 121051, 121105, 121123, 121141, 121204, 121222, 121240, 121312, 121330, 121411, 121501, 121600, 122014, 122032, 122050, 122113, 122131, 122203, 122221, 122302, 122320, 122410, 123004, 123022, 123040, 123112, 123130, 123211, 123301, 123400, 124012, 124030, 124111, 124201, 124300, 125011, 125101, 125200, 126010, 127000, 130015, 130033, 130051, 130105, 130123, 130141, 130204, 130222, 130240, 130312, 130330, 130411, 130501, 130600, 131014, 131032, 131050, 131113, 131131, 131203, 131221, 131302, 131320, 131410, 132004, 132022, 132040, 132112, 132130, 132211, 132301, 132400, 133012, 133030, 133111, 133201, 133300, 134011, 134101, 134200, 135010, 136000, 140014, 140032, 140050, 140113, 140131, 140203, 140221, 140302, 140320, 140410, 141004, 141022, 141040, 141112, 141130, 141211, 141301, 141400, 142012, 142030, 142111, 142201, 142300, 143011, 143101, 143200, 144010, 145000, 150013, 150031, 150103, 150121, 150202, 150220, 150310, 151003, 151021, 151102, 151120, 151210, 152002, 152020, 152110, 153001, 153100, 160003, 160021, 160102, 160120, 160210, 161002, 161020, 161110, 162001, 162100, 170002, 170020, 170110, 171001, 171100, 180001, 180100, 190000, 200017, 200035, 200053, 200071, 200107, 200125, 200143, 200161, 200206, 200224, 200242, 200260, 200314, 200332, 200350, 200413, 200431, 200503, 200521, 200602, 200620, 200710, 201007, 201025, 201043, 201061, 201106, 201124, 201142, 201160, 201214, 201232, 201250, 201313, 201331, 201403, 201421, 201502, 201520, 201610, 202006, 202024, 202042, 202060, 202114, 202132, 202150, 202213, 202231, 202303, 202321, 202402, 202420, 202510, 203005, 203023, 203041, 203104, 203122, 203140, 203212, 203230, 203311, 203401, 203500, 204013, 204031, 204103, 204121, 204202, 204220, 204310, 205003, 205021, 205102, 205120, 205210, 206002, 206020, 206110, 207001, 207100, 210007, 210025, 210043, 210061, 210106, 210124, 210142, 210160, 210214, 210232, 210250, 210313, 210331, 210403, 210421, 210502, 210520, 210610, 211006, 211024, 211042, 211060, 211114, 211132, 211150, 211213, 211231, 211303, 211321, 211402, 211420, 211510, 212005, 212023, 212041, 212104, 212122, 212140, 212212, 212230, 212311, 212401, 212500, 213013, 213031, 213103, 213121, 213202, 213220, 213310, 214003, 214021, 214102, 214120, 214210, 215002, 215020, 215110, 216001, 216100, 220006, 220024, 220042, 220060, 220114, 220132, 220150, 220213, 220231, 220303, 220321, 220402, 220420, 220510, 221005, 221023, 221041, 221104, 221122, 221140, 221212, 221230, 221311, 221401, 221500, 222013, 222031, 222103, 222121, 222202, 222220, 222310, 223003, 223021, 223102, 223120, 223210, 224002, 224020, 224110, 225001, 225100, 230005, 230023, 230041, 230104, 230122, 230140, 230212, 230230, 230311, 230401, 230500, 231013, 231031, 231103, 231121, 231202, 231220, 231310, 232003, 232021, 232102, 232120, 232210, 233002, 233020, 233110, 234001, 234100, 240004, 240022, 240040, 240112, 240130, 240211, 240301, 240400, 241012, 241030, 241111, 241201, 241300, 242011, 242101, 242200, 243010, 244000, 250012, 250030, 250111, 250201, 250300, 251011, 251101, 251200, 252010, 253000, 260011, 260101, 260200, 261010, 262000, 270010, 271000, 300007, 300025, 300043, 300061, 300106, 300124, 300142, 300160, 300214, 300232, 300250, 300313, 300331, 300403, 300421, 300502, 300520, 300610, 301006, 301024, 301042, 301060, 301114, 301132, 301150, 301213, 301231, 301303, 301321, 301402, 301420, 301510, 302005, 302023, 302041, 302104, 302122, 302140, 302212, 302230, 302311, 302401, 302500, 303013, 303031, 303103, 303121, 303202, 303220, 303310, 304003, 304021, 304102, 304120, 304210, 305002, 305020, 305110, 306001, 306100, 310006, 310024, 310042, 310060, 310114, 310132, 310150, 310213, 310231, 310303, 310321, 310402, 310420, 310510, 311005, 311023, 311041, 311104, 311122, 311140, 311212, 311230, 311311, 311401, 311500, 312013, 312031, 312103, 312121, 312202, 312220, 312310, 313003, 313021, 313102, 313120, 313210, 314002, 314020, 314110, 315001, 315100, 320005, 320023, 320041, 320104, 320122, 320140, 320212, 320230, 320311, 320401, 320500, 321013, 321031, 321103, 321121, 321202, 321220, 321310, 322003, 322021, 322102, 322120, 322210, 323002, 323020, 323110, 324001, 324100, 330004, 330022, 330040, 330112, 330130, 330211, 330301, 330400, 331012, 331030, 331111, 331201, 331300, 332011, 332101, 332200, 333010, 334000, 340012, 340030, 340111, 340201, 340300, 341011, 341101, 341200, 342010, 343000, 350011, 350101, 350200, 351010, 352000, 360010, 361000, 400006, 400024, 400042, 400060, 400114, 400132, 400150, 400213, 400231, 400303, 400321, 400402, 400420, 400510, 401005, 401023, 401041, 401104, 401122, 401140, 401212, 401230, 401311, 401401, 401500, 402013, 402031, 402103, 402121, 402202, 402220, 402310, 403003, 403021, 403102, 403120, 403210, 404002, 404020, 404110, 405001, 405100, 410005, 410023, 410041, 410104, 410122, 410140, 410212, 410230, 410311, 410401, 410500, 411013, 411031, 411103, 411121, 411202, 411220, 411310, 412003, 412021, 412102, 412120, 412210, 413002, 413020, 413110, 414001, 414100, 420004, 420022, 420040, 420112, 420130, 420211, 420301, 420400, 421012, 421030, 421111, 421201, 421300, 422011, 422101, 422200, 423010, 424000, 430012, 430030, 430111, 430201, 430300, 431011, 431101, 431200, 432010, 433000, 440011, 440101, 440200, 441010, 442000, 450010, 451000, 500005, 500023, 500041, 500104, 500122, 500140, 500212, 500230, 500311, 500401, 500500, 501013, 501031, 501103, 501121, 501202, 501220, 501310, 502003, 502021, 502102, 502120, 502210, 503002, 503020, 503110, 504001, 504100, 510004, 510022, 510040, 510112, 510130, 510211, 510301, 510400, 511012, 511030, 511111, 511201, 511300, 512011, 512101, 512200, 513010, 514000, 520012, 520030, 520111, 520201, 520300, 521011, 521101, 521200, 522010, 523000, 530011, 530101, 530200, 531010, 532000, 540010, 541000, 600004, 600022, 600040, 600112, 600130, 600211, 600301, 600400, 601012, 601030, 601111, 601201, 601300, 602011, 602101, 602200, 603010, 604000, 610012, 610030, 610111, 610201, 610300, 611011, 611101, 611200, 612010, 613000, 620011, 620101, 620200, 621010, 622000, 630010, 631000, 700003, 700021, 700102, 700120, 700210, 701002, 701020, 701110, 702001, 702100, 710002, 710020, 710110, 711001, 711100, 720001, 720100, 730000, 800011, 800101, 800200, 801010, 802000, 810010, 811000, 900001, 900100, 910000, 1000018, 1000036, 1000054, 1000072, 1000090, 1000117, 1000135, 1000153, 1000171, 1000207, 1000225, 1000243, 1000261, 1000306, 1000324, 1000342, 1000360, 1000414, 1000432, 1000450, 1000513, 1000531, 1000603, 1000621, 1000702, 1000720, 1000810, 1001008, 1001026, 1001044, 1001062, 1001080, 1001116, 1001134, 1001152, 1001170, 1001215, 1001233, 1001251, 1001305, 1001323, 1001341, 1001404, 1001422, 1001440, 1001512, 1001530, 1001611, 1001701, 1001800, 1002016, 1002034, 1002052, 1002070, 1002115, 1002133, 1002151, 1002205, 1002223, 1002241, 1002304, 1002322, 1002340, 1002412, 1002430, 1002511, 1002601, 1002700, 1003015, 1003033, 1003051, 1003105, 1003123, 1003141, 1003204, 1003222, 1003240, 1003312, 1003330, 1003411, 1003501, 1003600, 1004014, 1004032, 1004050, 1004113, 1004131, 1004203, 1004221, 1004302, 1004320, 1004410, 1005004, 1005022, 1005040, 1005112, 1005130, 1005211, 1005301, 1005400, 1006012, 1006030, 1006111, 1006201, 1006300, 1007011, 1007101, 1007200, 1008010, 1009000, 1010017, 1010035, 1010053, 1010071, 1010107, 1010125, 1010143, 1010161, 1010206, 1010224, 1010242, 1010260, 1010314, 1010332, 1010350, 1010413, 1010431, 1010503, 1010521, 1010602, 1010620, 1010710, 1011007, 1011025, 1011043, 1011061, 1011106, 1011124, 1011142, 1011160, 1011214, 1011232, 1011250, 1011313, 1011331, 1011403, 1011421, 1011502, 1011520, 1011610, 1012006, 1012024, 1012042, 1012060, 1012114, 1012132, 1012150, 1012213, 1012231, 1012303, 1012321, 1012402, 1012420, 1012510, 1013005, 1013023, 1013041, 1013104, 1013122, 1013140, 1013212, 1013230, 1013311, 1013401, 1013500, 1014013, 1014031, 1014103, 1014121, 1014202, 1014220, 1014310, 1015003, 1015021, 1015102, 1015120, 1015210, 1016002, 1016020, 1016110, 1017001, 1017100, 1020007, 1020025, 1020043, 1020061, 1020106, 1020124, 1020142, 1020160, 1020214, 1020232, 1020250, 1020313, 1020331, 1020403, 1020421, 1020502, 1020520, 1020610, 1021006, 1021024, 1021042, 1021060, 1021114, 1021132, 1021150, 1021213, 1021231, 1021303, 1021321, 1021402, 1021420, 1021510, 1022005, 1022023, 1022041, 1022104, 1022122, 1022140, 1022212, 1022230, 1022311, 1022401, 1022500, 1023013, 1023031, 1023103, 1023121, 1023202, 1023220, 1023310, 1024003, 1024021, 1024102, 1024120, 1024210, 1025002, 1025020, 1025110, 1026001, 1026100, 1030006, 1030024, 1030042, 1030060, 1030114, 1030132, 1030150, 1030213, 1030231, 1030303, 1030321, 1030402, 1030420, 1030510, 1031005, 1031023, 1031041, 1031104, 1031122, 1031140, 1031212, 1031230, 1031311, 1031401, 1031500, 1032013, 1032031, 1032103, 1032121, 1032202, 1032220, 1032310, 1033003, 1033021, 1033102, 1033120, 1033210, 1034002, 1034020, 1034110, 1035001, 1035100, 1040005, 1040023, 1040041, 1040104, 1040122, 1040140, 1040212, 1040230, 1040311, 1040401, 1040500, 1041013, 1041031, 1041103, 1041121, 1041202, 1041220, 1041310, 1042003, 1042021, 1042102, 1042120, 1042210, 1043002, 1043020, 1043110, 1044001, 1044100, 1050004, 1050022, 1050040, 1050112, 1050130, 1050211, 1050301, 1050400, 1051012, 1051030, 1051111, 1051201, 1051300, 1052011, 1052101, 1052200, 1053010, 1054000, 1060012, 1060030, 1060111, 1060201, 1060300, 1061011, 1061101, 1061200, 1062010, 1063000, 1070011, 1070101, 1070200, 1071010, 1072000, 1080010, 1081000, 1100008, 1100026, 1100044, 1100062, 1100080, 1100116, 1100134, 1100152, 1100170, 1100215, 1100233, 1100251, 1100305, 1100323, 1100341, 1100404, 1100422, 1100440, 1100512, 1100530, 1100611, 1100701, 1100800, 1101016, 1101034, 1101052, 1101070, 1101115, 1101133, 1101151, 1101205, 1101223, 1101241, 1101304, 1101322, 1101340, 1101412, 1101430, 1101511, 1101601, 1101700, 1102015, 1102033, 1102051, 1102105, 1102123, 1102141, 1102204, 1102222, 1102240, 1102312, 1102330, 1102411, 1102501, 1102600, 1103014, 1103032, 1103050, 1103113, 1103131, 1103203, 1103221, 1103302, 1103320, 1103410, 1104004, 1104022, 1104040, 1104112, 1104130, 1104211, 1104301, 1104400, 1105012, 1105030, 1105111, 1105201, 1105300, 1106011, 1106101, 1106200, 1107010, 1108000, 1110016, 1110034, 1110052, 1110070, 1110115, 1110133, 1110151, 1110205, 1110223, 1110241, 1110304, 1110322, 1110340, 1110412, 1110430, 1110511, 1110601, 1110700, 1111015, 1111033, 1111051, 1111105, 1111123, 1111141, 1111204, 1111222, 1111240, 1111312, 1111330, 1111411, 1111501, 1111600, 1112014, 1112032, 1112050, 1112113, 1112131, 1112203, 1112221, 1112302, 1112320, 1112410, 1113004, 1113022, 1113040, 1113112, 1113130, 1113211, 1113301, 1113400, 1114012, 1114030, 1114111, 1114201, 1114300, 1115011, 1115101, 1115200, 1116010, 1117000, 1120015, 1120033, 1120051, 1120105, 1120123, 1120141, 1120204, 1120222, 1120240, 1120312, 1120330, 1120411, 1120501, 1120600, 1121014, 1121032, 1121050, 1121113, 1121131, 1121203, 1121221, 1121302, 1121320, 1121410, 1122004, 1122022, 1122040, 1122112, 1122130, 1122211, 1122301, 1122400, 1123012, 1123030, 1123111, 1123201, 1123300, 1124011, 1124101, 1124200, 1125010, 1126000, 1130014, 1130032, 1130050, 1130113, 1130131, 1130203, 1130221, 1130302, 1130320, 1130410, 1131004, 1131022, 1131040, 1131112, 1131130, 1131211, 1131301, 1131400, 1132012, 1132030, 1132111, 1132201, 1132300, 1133011, 1133101, 1133200, 1134010, 1135000, 1140013, 1140031, 1140103, 1140121, 1140202, 1140220, 1140310, 1141003, 1141021, 1141102, 1141120, 1141210, 1142002, 1142020, 1142110, 1143001, 1143100, 1150003, 1150021, 1150102, 1150120, 1150210, 1151002, 1151020, 1151110, 1152001, 1152100, 1160002, 1160020, 1160110, 1161001, 1161100, 1170001, 1170100, 1180000, 1200016, 1200034, 1200052, 1200070, 1200115, 1200133, 1200151, 1200205, 1200223, 1200241, 1200304, 1200322, 1200340, 1200412, 1200430, 1200511, 1200601, 1200700, 1201015, 1201033, 1201051, 1201105, 1201123, 1201141, 1201204, 1201222, 1201240, 1201312, 1201330, 1201411, 1201501, 1201600, 1202014, 1202032, 1202050, 1202113, 1202131, 1202203, 1202221, 1202302, 1202320, 1202410, 1203004, 1203022, 1203040, 1203112, 1203130, 1203211, 1203301, 1203400, 1204012, 1204030, 1204111, 1204201, 1204300, 1205011, 1205101, 1205200, 1206010, 1207000, 1210015, 1210033, 1210051, 1210105, 1210123, 1210141, 1210204, 1210222, 1210240, 1210312, 1210330, 1210411, 1210501, 1210600, 1211014, 1211032, 1211050, 1211113, 1211131, 1211203, 1211221, 1211302, 1211320, 1211410, 1212004, 1212022, 1212040, 1212112, 1212130, 1212211, 1212301, 1212400, 1213012, 1213030, 1213111, 1213201, 1213300, 1214011, 1214101, 1214200, 1215010, 1216000, 1220014, 1220032, 1220050, 1220113, 1220131, 1220203, 1220221, 1220302, 1220320, 1220410, 1221004, 1221022, 1221040, 1221112, 1221130, 1221211, 1221301, 1221400, 1222012, 1222030, 1222111, 1222201, 1222300, 1223011, 1223101, 1223200, 1224010, 1225000, 1230013, 1230031, 1230103, 1230121, 1230202, 1230220, 1230310, 1231003, 1231021, 1231102, 1231120, 1231210, 1232002, 1232020, 1232110, 1233001, 1233100, 1240003, 1240021, 1240102, 1240120, 1240210, 1241002, 1241020, 1241110, 1242001, 1242100, 1250002, 1250020, 1250110, 1251001, 1251100, 1260001, 1260100, 1270000, 1300015, 1300033, 1300051, 1300105, 1300123, 1300141, 1300204, 1300222, 1300240, 1300312, 1300330, 1300411, 1300501, 1300600, 1301014, 1301032, 1301050, 1301113, 1301131, 1301203, 1301221, 1301302, 1301320, 1301410, 1302004, 1302022, 1302040, 1302112, 1302130, 1302211, 1302301, 1302400, 1303012, 1303030, 1303111, 1303201, 1303300, 1304011, 1304101, 1304200, 1305010, 1306000, 1310014, 1310032, 1310050, 1310113, 1310131, 1310203, 1310221, 1310302, 1310320, 1310410, 1311004, 1311022, 1311040, 1311112, 1311130, 1311211, 1311301, 1311400, 1312012, 1312030, 1312111, 1312201, 1312300, 1313011, 1313101, 1313200, 1314010, 1315000, 1320013, 1320031, 1320103, 1320121, 1320202, 1320220, 1320310, 1321003, 1321021, 1321102, 1321120, 1321210, 1322002, 1322020, 1322110, 1323001, 1323100, 1330003, 1330021, 1330102, 1330120, 1330210, 1331002, 1331020, 1331110, 1332001, 1332100, 1340002, 1340020, 1340110, 1341001, 1341100, 1350001, 1350100, 1360000, 1400014, 1400032, 1400050, 1400113, 1400131, 1400203, 1400221, 1400302, 1400320, 1400410, 1401004, 1401022, 1401040, 1401112, 1401130, 1401211, 1401301, 1401400, 1402012, 1402030, 1402111, 1402201, 1402300, 1403011, 1403101, 1403200, 1404010, 1405000, 1410013, 1410031, 1410103, 1410121, 1410202, 1410220, 1410310, 1411003, 1411021, 1411102, 1411120, 1411210, 1412002, 1412020, 1412110, 1413001, 1413100, 1420003, 1420021, 1420102, 1420120, 1420210, 1421002, 1421020, 1421110, 1422001, 1422100, 1430002, 1430020, 1430110, 1431001, 1431100, 1440001, 1440100, 1450000, 1500013, 1500031, 1500103, 1500121, 1500202, 1500220, 1500310, 1501003, 1501021, 1501102, 1501120, 1501210, 1502002, 1502020, 1502110, 1503001, 1503100, 1510003, 1510021, 1510102, 1510120, 1510210, 1511002, 1511020, 1511110, 1512001, 1512100, 1520002, 1520020, 1520110, 1521001, 1521100, 1530001, 1530100, 1540000, 1600012, 1600030, 1600111, 1600201, 1600300, 1601011, 1601101, 1601200, 1602010, 1603000, 1610011, 1610101, 1610200, 1611010, 1612000, 1620010, 1621000, 1700002, 1700020, 1700110, 1701001, 1701100, 1710001, 1710100, 1720000, 1800010, 1801000, 1900000, 2000017, 2000035, 2000053, 2000071, 2000107, 2000125, 2000143, 2000161, 2000206, 2000224, 2000242, 2000260, 2000314, 2000332, 2000350, 2000413, 2000431, 2000503, 2000521, 2000602, 2000620, 2000710, 2001007, 2001025, 2001043, 2001061, 2001106, 2001124, 2001142, 2001160, 2001214, 2001232, 2001250, 2001313, 2001331, 2001403, 2001421, 2001502, 2001520, 2001610, 2002006, 2002024, 2002042, 2002060, 2002114, 2002132, 2002150, 2002213, 2002231, 2002303, 2002321, 2002402, 2002420, 2002510, 2003005, 2003023, 2003041, 2003104, 2003122, 2003140, 2003212, 2003230, 2003311, 2003401, 2003500, 2004013, 2004031, 2004103, 2004121, 2004202, 2004220, 2004310, 2005003, 2005021, 2005102, 2005120, 2005210, 2006002, 2006020, 2006110, 2007001, 2007100, 2010007, 2010025, 2010043, 2010061, 2010106, 2010124, 2010142, 2010160, 2010214, 2010232, 2010250, 2010313, 2010331, 2010403, 2010421, 2010502, 2010520, 2010610, 2011006, 2011024, 2011042, 2011060, 2011114, 2011132, 2011150, 2011213, 2011231, 2011303, 2011321, 2011402, 2011420, 2011510, 2012005, 2012023, 2012041, 2012104, 2012122, 2012140, 2012212, 2012230, 2012311, 2012401, 2012500, 2013013, 2013031, 2013103, 2013121, 2013202, 2013220, 2013310, 2014003, 2014021, 2014102, 2014120, 2014210, 2015002, 2015020, 2015110, 2016001, 2016100, 2020006, 2020024, 2020042, 2020060, 2020114, 2020132, 2020150, 2020213, 2020231, 2020303, 2020321, 2020402, 2020420, 2020510, 2021005, 2021023, 2021041, 2021104, 2021122, 2021140, 2021212, 2021230, 2021311, 2021401, 2021500, 2022013, 2022031, 2022103, 2022121, 2022202, 2022220, 2022310, 2023003, 2023021, 2023102, 2023120, 2023210, 2024002, 2024020, 2024110, 2025001, 2025100, 2030005, 2030023, 2030041, 2030104, 2030122, 2030140, 2030212, 2030230, 2030311, 2030401, 2030500, 2031013, 2031031, 2031103, 2031121, 2031202, 2031220, 2031310, 2032003, 2032021, 2032102, 2032120, 2032210, 2033002, 2033020, 2033110, 2034001, 2034100, 2040004, 2040022, 2040040, 2040112, 2040130, 2040211, 2040301, 2040400, 2041012, 2041030, 2041111, 2041201, 2041300, 2042011, 2042101, 2042200, 2043010, 2044000, 2050012, 2050030, 2050111, 2050201, 2050300, 2051011, 2051101, 2051200, 2052010, 2053000, 2060011, 2060101, 2060200, 2061010, 2062000, 2070010, 2071000, 2100007, 2100025, 2100043, 2100061, 2100106, 2100124, 2100142, 2100160, 2100214, 2100232, 2100250, 2100313, 2100331, 2100403, 2100421, 2100502, 2100520, 2100610, 2101006, 2101024, 2101042, 2101060, 2101114, 2101132, 2101150, 2101213, 2101231, 2101303, 2101321, 2101402, 2101420, 2101510, 2102005, 2102023, 2102041, 2102104, 2102122, 2102140, 2102212, 2102230, 2102311, 2102401, 2102500, 2103013, 2103031, 2103103, 2103121, 2103202, 2103220, 2103310, 2104003, 2104021, 2104102, 2104120, 2104210, 2105002, 2105020, 2105110, 2106001, 2106100, 2110006, 2110024, 2110042, 2110060, 2110114, 2110132, 2110150, 2110213, 2110231, 2110303, 2110321, 2110402, 2110420, 2110510, 2111005, 2111023, 2111041, 2111104, 2111122, 2111140, 2111212, 2111230, 2111311, 2111401, 2111500, 2112013, 2112031, 2112103, 2112121, 2112202, 2112220, 2112310, 2113003, 2113021, 2113102, 2113120, 2113210, 2114002, 2114020, 2114110, 2115001, 2115100, 2120005, 2120023, 2120041, 2120104, 2120122, 2120140, 2120212, 2120230, 2120311, 2120401, 2120500, 2121013, 2121031, 2121103, 2121121, 2121202, 2121220, 2121310, 2122003, 2122021, 2122102, 2122120, 2122210, 2123002, 2123020, 2123110, 2124001, 2124100, 2130004, 2130022, 2130040, 2130112, 2130130, 2130211, 2130301, 2130400, 2131012, 2131030, 2131111, 2131201, 2131300, 2132011, 2132101, 2132200, 2133010, 2134000, 2140012, 2140030, 2140111, 2140201, 2140300, 2141011, 2141101, 2141200, 2142010, 2143000, 2150011, 2150101, 2150200, 2151010, 2152000, 2160010, 2161000, 2200006, 2200024, 2200042, 2200060, 2200114, 2200132, 2200150, 2200213, 2200231, 2200303, 2200321, 2200402, 2200420, 2200510, 2201005, 2201023, 2201041, 2201104, 2201122, 2201140, 2201212, 2201230, 2201311, 2201401, 2201500, 2202013, 2202031, 2202103, 2202121, 2202202, 2202220, 2202310, 2203003, 2203021, 2203102, 2203120, 2203210, 2204002, 2204020, 2204110, 2205001, 2205100, 2210005, 2210023, 2210041, 2210104, 2210122, 2210140, 2210212, 2210230, 2210311, 2210401, 2210500, 2211013, 2211031, 2211103, 2211121, 2211202, 2211220, 2211310, 2212003, 2212021, 2212102, 2212120, 2212210, 2213002, 2213020, 2213110, 2214001, 2214100, 2220004, 2220022, 2220040, 2220112, 2220130, 2220211, 2220301, 2220400, 2221012, 2221030, 2221111, 2221201, 2221300, 2222011, 2222101, 2222200, 2223010, 2224000, 2230012, 2230030, 2230111, 2230201, 2230300, 2231011, 2231101, 2231200, 2232010, 2233000, 2240011, 2240101, 2240200, 2241010, 2242000, 2250010, 2251000, 2300005, 2300023, 2300041, 2300104, 2300122, 2300140, 2300212, 2300230, 2300311, 2300401, 2300500, 2301013, 2301031, 2301103, 2301121, 2301202, 2301220, 2301310, 2302003, 2302021, 2302102, 2302120, 2302210, 2303002, 2303020, 2303110, 2304001, 2304100, 2310004, 2310022, 2310040, 2310112, 2310130, 2310211, 2310301, 2310400, 2311012, 2311030, 2311111, 2311201, 2311300, 2312011, 2312101, 2312200, 2313010, 2314000, 2320012, 2320030, 2320111, 2320201, 2320300, 2321011, 2321101, 2321200, 2322010, 2323000, 2330011, 2330101, 2330200, 2331010, 2332000, 2340010, 2341000, 2400004, 2400022, 2400040, 2400112, 2400130, 2400211, 2400301, 2400400, 2401012, 2401030, 2401111, 2401201, 2401300, 2402011, 2402101, 2402200, 2403010, 2404000, 2410012, 2410030, 2410111, 2410201, 2410300, 2411011, 2411101, 2411200, 2412010, 2413000, 2420011, 2420101, 2420200, 2421010, 2422000, 2430010, 2431000, 2500003, 2500021, 2500102, 2500120, 2500210, 2501002, 2501020, 2501110, 2502001, 2502100, 2510002, 2510020, 2510110, 2511001, 2511100, 2520001, 2520100, 2530000, 2600011, 2600101, 2600200, 2601010, 2602000, 2610010, 2611000, 2700001, 2700100, 2710000, 3000007, 3000025, 3000043, 3000061, 3000106, 3000124, 3000142, 3000160, 3000214, 3000232, 3000250, 3000313, 3000331, 3000403, 3000421, 3000502, 3000520, 3000610, 3001006, 3001024, 3001042, 3001060, 3001114, 3001132, 3001150, 3001213, 3001231, 3001303, 3001321, 3001402, 3001420, 3001510, 3002005, 3002023, 3002041, 3002104, 3002122, 3002140, 3002212, 3002230, 3002311, 3002401, 3002500, 3003013, 3003031, 3003103, 3003121, 3003202, 3003220, 3003310, 3004003, 3004021, 3004102, 3004120, 3004210, 3005002, 3005020, 3005110, 3006001, 3006100, 3010006, 3010024, 3010042, 3010060, 3010114, 3010132, 3010150, 3010213, 3010231, 3010303, 3010321, 3010402, 3010420, 3010510, 3011005, 3011023, 3011041, 3011104, 3011122, 3011140, 3011212, 3011230, 3011311, 3011401, 3011500, 3012013, 3012031, 3012103, 3012121, 3012202, 3012220, 3012310, 3013003, 3013021, 3013102, 3013120, 3013210, 3014002, 3014020, 3014110, 3015001, 3015100, 3020005, 3020023, 3020041, 3020104, 3020122, 3020140, 3020212, 3020230, 3020311, 3020401, 3020500, 3021013, 3021031, 3021103, 3021121, 3021202, 3021220, 3021310, 3022003, 3022021, 3022102, 3022120, 3022210, 3023002, 3023020, 3023110, 3024001, 3024100, 3030004, 3030022, 3030040, 3030112, 3030130, 3030211, 3030301, 3030400, 3031012, 3031030, 3031111, 3031201, 3031300, 3032011, 3032101, 3032200, 3033010, 3034000, 3040012, 3040030, 3040111, 3040201, 3040300, 3041011, 3041101, 3041200, 3042010, 3043000, 3050011, 3050101, 3050200, 3051010, 3052000, 3060010, 3061000, 3100006, 3100024, 3100042, 3100060, 3100114, 3100132, 3100150, 3100213, 3100231, 3100303, 3100321, 3100402, 3100420, 3100510, 3101005, 3101023, 3101041, 3101104, 3101122, 3101140, 3101212, 3101230, 3101311, 3101401, 3101500, 3102013, 3102031, 3102103, 3102121, 3102202, 3102220, 3102310, 3103003, 3103021, 3103102, 3103120, 3103210, 3104002, 3104020, 3104110, 3105001, 3105100, 3110005, 3110023, 3110041, 3110104, 3110122, 3110140, 3110212, 3110230, 3110311, 3110401, 3110500, 3111013, 3111031, 3111103, 3111121, 3111202, 3111220, 3111310, 3112003, 3112021, 3112102, 3112120, 3112210, 3113002, 3113020, 3113110, 3114001, 3114100, 3120004, 3120022, 3120040, 3120112, 3120130, 3120211, 3120301, 3120400, 3121012, 3121030, 3121111, 3121201, 3121300, 3122011, 3122101, 3122200, 3123010, 3124000, 3130012, 3130030, 3130111, 3130201, 3130300, 3131011, 3131101, 3131200, 3132010, 3133000, 3140011, 3140101, 3140200, 3141010, 3142000, 3150010, 3151000, 3200005, 3200023, 3200041, 3200104, 3200122, 3200140, 3200212, 3200230, 3200311, 3200401, 3200500, 3201013, 3201031, 3201103, 3201121, 3201202, 3201220, 3201310, 3202003, 3202021, 3202102, 3202120, 3202210, 3203002, 3203020, 3203110, 3204001, 3204100, 3210004, 3210022, 3210040, 3210112, 3210130, 3210211, 3210301, 3210400, 3211012, 3211030, 3211111, 3211201, 3211300, 3212011, 3212101, 3212200, 3213010, 3214000, 3220012, 3220030, 3220111, 3220201, 3220300, 3221011, 3221101, 3221200, 3222010, 3223000, 3230011, 3230101, 3230200, 3231010, 3232000, 3240010, 3241000, 3300004, 3300022, 3300040, 3300112, 3300130, 3300211, 3300301, 3300400, 3301012, 3301030, 3301111, 3301201, 3301300, 3302011, 3302101, 3302200, 3303010, 3304000, 3310012, 3310030, 3310111, 3310201, 3310300, 3311011, 3311101, 3311200, 3312010, 3313000, 3320011, 3320101, 3320200, 3321010, 3322000, 3330010, 3331000, 3400003, 3400021, 3400102, 3400120, 3400210, 3401002, 3401020, 3401110, 3402001, 3402100, 3410002, 3410020, 3410110, 3411001, 3411100, 3420001, 3420100, 3430000, 3500011, 3500101, 3500200, 3501010, 3502000, 3510010, 3511000, 3600001, 3600100, 3610000, 4000006, 4000024, 4000042, 4000060, 4000114, 4000132, 4000150, 4000213, 4000231, 4000303, 4000321, 4000402, 4000420, 4000510, 4001005, 4001023, 4001041, 4001104, 4001122, 4001140, 4001212, 4001230, 4001311, 4001401, 4001500, 4002013, 4002031, 4002103, 4002121, 4002202, 4002220, 4002310, 4003003, 4003021, 4003102, 4003120, 4003210, 4004002, 4004020, 4004110, 4005001, 4005100, 4010005, 4010023, 4010041, 4010104, 4010122, 4010140, 4010212, 4010230, 4010311, 4010401, 4010500, 4011013, 4011031, 4011103, 4011121, 4011202, 4011220, 4011310, 4012003, 4012021, 4012102, 4012120, 4012210, 4013002, 4013020, 4013110, 4014001, 4014100, 4020004, 4020022, 4020040, 4020112, 4020130, 4020211, 4020301, 4020400, 4021012, 4021030, 4021111, 4021201, 4021300, 4022011, 4022101, 4022200, 4023010, 4024000, 4030012, 4030030, 4030111, 4030201, 4030300, 4031011, 4031101, 4031200, 4032010, 4033000, 4040011, 4040101, 4040200, 4041010, 4042000, 4050010, 4051000, 4100005, 4100023, 4100041, 4100104, 4100122, 4100140, 4100212, 4100230, 4100311, 4100401, 4100500, 4101013, 4101031, 4101103, 4101121, 4101202, 4101220, 4101310, 4102003, 4102021, 4102102, 4102120, 4102210, 4103002, 4103020, 4103110, 4104001, 4104100, 4110004, 4110022, 4110040, 4110112, 4110130, 4110211, 4110301, 4110400, 4111012, 4111030, 4111111, 4111201, 4111300, 4112011, 4112101, 4112200, 4113010, 4114000, 4120012, 4120030, 4120111, 4120201, 4120300, 4121011, 4121101, 4121200, 4122010, 4123000, 4130011, 4130101, 4130200, 4131010, 4132000, 4140010, 4141000, 4200004, 4200022, 4200040, 4200112, 4200130, 4200211, 4200301, 4200400, 4201012, 4201030, 4201111, 4201201, 4201300, 4202011, 4202101, 4202200, 4203010, 4204000, 4210012, 4210030, 4210111, 4210201, 4210300, 4211011, 4211101, 4211200, 4212010, 4213000, 4220011, 4220101, 4220200, 4221010, 4222000, 4230010, 4231000, 4300003, 4300021, 4300102, 4300120, 4300210, 4301002, 4301020, 4301110, 4302001, 4302100, 4310002, 4310020, 4310110, 4311001, 4311100, 4320001, 4320100, 4330000, 4400011, 4400101, 4400200, 4401010, 4402000, 4410010, 4411000, 4500001, 4500100, 4510000, 5000005, 5000023, 5000041, 5000104, 5000122, 5000140, 5000212, 5000230, 5000311, 5000401, 5000500, 5001013, 5001031, 5001103, 5001121, 5001202, 5001220, 5001310, 5002003, 5002021, 5002102, 5002120, 5002210, 5003002, 5003020, 5003110, 5004001, 5004100, 5010004, 5010022, 5010040, 5010112, 5010130, 5010211, 5010301, 5010400, 5011012, 5011030, 5011111, 5011201, 5011300, 5012011, 5012101, 5012200, 5013010, 5014000, 5020012, 5020030, 5020111, 5020201, 5020300, 5021011, 5021101, 5021200, 5022010, 5023000, 5030011, 5030101, 5030200, 5031010, 5032000, 5040010, 5041000, 5100004, 5100022, 5100040, 5100112, 5100130, 5100211, 5100301, 5100400, 5101012, 5101030, 5101111, 5101201, 5101300, 5102011, 5102101, 5102200, 5103010, 5104000, 5110012, 5110030, 5110111, 5110201, 5110300, 5111011, 5111101, 5111200, 5112010, 5113000, 5120011, 5120101, 5120200, 5121010, 5122000, 5130010, 5131000, 5200003, 5200021, 5200102, 5200120, 5200210, 5201002, 5201020, 5201110, 5202001, 5202100, 5210002, 5210020, 5210110, 5211001, 5211100, 5220001, 5220100, 5230000, 5300011, 5300101, 5300200, 5301010, 5302000, 5310010, 5311000, 5400001, 5400100, 5410000, 6000004, 6000022, 6000040, 6000112, 6000130, 6000211, 6000301, 6000400, 6001012, 6001030, 6001111, 6001201, 6001300, 6002011, 6002101, 6002200, 6003010, 6004000, 6010012, 6010030, 6010111, 6010201, 6010300, 6011011, 6011101, 6011200, 6012010, 6013000, 6020011, 6020101, 6020200, 6021010, 6022000, 6030010, 6031000, 6100003, 6100021, 6100102, 6100120, 6100210, 6101002, 6101020, 6101110, 6102001, 6102100, 6110002, 6110020, 6110110, 6111001, 6111100, 6120001, 6120100, 6130000, 6200011, 6200101, 6200200, 6201010, 6202000, 6210010, 6211000, 6300001, 6300100, 6310000, 7000003, 7000021, 7000102, 7000120, 7000210, 7001002, 7001020, 7001110, 7002001, 7002100, 7010002, 7010020, 7010110, 7011001, 7011100, 7020001, 7020100, 7030000, 7100011, 7100101, 7100200, 7101010, 7102000, 7110010, 7111000, 7200001, 7200100, 7210000, 8000002, 8000020, 8000110, 8001001, 8001100, 8010001, 8010100, 8020000, 8100010, 8101000, 8200000, 9000010, 9001000, 9100000, 10000018, 10000036, 10000054, 10000072, 10000090, 10000117, 10000135, 10000153, 10000171, 10000207, 10000225, 10000243, 10000261, 10000306, 10000324, 10000342, 10000360, 10000414, 10000432, 10000450, 10000513, 10000531, 10000603, 10000621, 10000702, 10000720, 10000810, 10001008, 10001026, 10001044, 10001062, 10001080, 10001116, 10001134, 10001152, 10001170, 10001215, 10001233, 10001251, 10001305, 10001323, 10001341, 10001404, 10001422, 10001440, 10001512, 10001530, 10001611, 10001701, 10001800, 10002016, 10002034, 10002052, 10002070, 10002115, 10002133, 10002151, 10002205, 10002223, 10002241, 10002304, 10002322, 10002340, 10002412, 10002430, 10002511, 10002601, 10002700, 10003015, 10003033, 10003051, 10003105, 10003123, 10003141, 10003204, 10003222, 10003240, 10003312, 10003330, 10003411, 10003501, 10003600, 10004014, 10004032, 10004050, 10004113, 10004131, 10004203, 10004221, 10004302, 10004320, 10004410, 10005004, 10005022, 10005040, 10005112, 10005130, 10005211, 10005301, 10005400, 10006012, 10006030, 10006111, 10006201, 10006300, 10007011, 10007101, 10007200, 10008010, 10009000, 10010017, 10010035, 10010053, 10010071, 10010107, 10010125, 10010143, 10010161, 10010206, 10010224, 10010242, 10010260, 10010314, 10010332, 10010350, 10010413, 10010431, 10010503, 10010521, 10010602, 10010620, 10010710, 10011007, 10011025, 10011043, 10011061, 10011106, 10011124, 10011142, 10011160, 10011214, 10011232, 10011250, 10011313, 10011331, 10011403, 10011421, 10011502, 10011520, 10011610, 10012006, 10012024, 10012042, 10012060, 10012114, 10012132, 10012150, 10012213, 10012231, 10012303, 10012321, 10012402, 10012420, 10012510, 10013005, 10013023, 10013041, 10013104, 10013122, 10013140, 10013212, 10013230, 10013311, 10013401, 10013500, 10014013, 10014031, 10014103, 10014121, 10014202, 10014220, 10014310, 10015003, 10015021, 10015102, 10015120, 10015210, 10016002, 10016020, 10016110, 10017001, 10017100, 10020007, 10020025, 10020043, 10020061, 10020106, 10020124, 10020142, 10020160, 10020214, 10020232, 10020250, 10020313, 10020331, 10020403, 10020421, 10020502, 10020520, 10020610, 10021006, 10021024, 10021042, 10021060, 10021114, 10021132, 10021150, 10021213, 10021231, 10021303, 10021321, 10021402, 10021420, 10021510, 10022005, 10022023, 10022041, 10022104, 10022122, 10022140, 10022212, 10022230, 10022311, 10022401, 10022500, 10023013, 10023031, 10023103, 10023121, 10023202, 10023220, 10023310, 10024003, 10024021, 10024102, 10024120, 10024210, 10025002, 10025020, 10025110, 10026001, 10026100, 10030006, 10030024, 10030042, 10030060, 10030114, 10030132, 10030150, 10030213, 10030231, 10030303, 10030321, 10030402, 10030420, 10030510, 10031005, 10031023, 10031041, 10031104, 10031122, 10031140, 10031212, 10031230, 10031311, 10031401, 10031500, 10032013, 10032031, 10032103, 10032121, 10032202, 10032220, 10032310, 10033003, 10033021, 10033102, 10033120, 10033210, 10034002, 10034020, 10034110, 10035001, 10035100, 10040005, 10040023, 10040041, 10040104, 10040122, 10040140, 10040212, 10040230, 10040311, 10040401, 10040500, 10041013, 10041031, 10041103, 10041121, 10041202, 10041220, 10041310, 10042003, 10042021, 10042102, 10042120, 10042210, 10043002, 10043020, 10043110, 10044001, 10044100, 10050004, 10050022, 10050040, 10050112, 10050130, 10050211, 10050301, 10050400, 10051012, 10051030, 10051111, 10051201, 10051300, 10052011, 10052101, 10052200, 10053010, 10054000, 10060012, 10060030, 10060111, 10060201, 10060300, 10061011, 10061101, 10061200, 10062010, 10063000, 10070011, 10070101, 10070200, 10071010, 10072000, 10080010, 10081000, 10100008, 10100026, 10100044, 10100062, 10100080, 10100116, 10100134, 10100152, 10100170, 10100215, 10100233, 10100251, 10100305, 10100323, 10100341, 10100404, 10100422, 10100440, 10100512, 10100530, 10100611, 10100701, 10100800, 10101016, 10101034, 10101052, 10101070, 10101115, 10101133, 10101151, 10101205, 10101223, 10101241, 10101304, 10101322, 10101340, 10101412, 10101430, 10101511, 10101601, 10101700, 10102015, 10102033, 10102051, 10102105, 10102123, 10102141, 10102204, 10102222, 10102240, 10102312, 10102330, 10102411, 10102501, 10102600, 10103014, 10103032, 10103050, 10103113, 10103131, 10103203, 10103221, 10103302, 10103320, 10103410, 10104004, 10104022, 10104040, 10104112, 10104130, 10104211, 10104301, 10104400, 10105012, 10105030, 10105111, 10105201, 10105300, 10106011, 10106101, 10106200, 10107010, 10108000, 10110016, 10110034, 10110052, 10110070, 10110115, 10110133, 10110151, 10110205, 10110223, 10110241, 10110304, 10110322, 10110340, 10110412, 10110430, 10110511, 10110601, 10110700, 10111015, 10111033, 10111051, 10111105, 10111123, 10111141, 10111204, 10111222, 10111240, 10111312, 10111330, 10111411, 10111501, 10111600, 10112014, 10112032, 10112050, 10112113, 10112131, 10112203, 10112221, 10112302, 10112320, 10112410, 10113004, 10113022, 10113040, 10113112, 10113130, 10113211, 10113301, 10113400, 10114012, 10114030, 10114111, 10114201, 10114300, 10115011, 10115101, 10115200, 10116010, 10117000, 10120015, 10120033, 10120051, 10120105, 10120123, 10120141, 10120204, 10120222, 10120240, 10120312, 10120330, 10120411, 10120501, 10120600, 10121014, 10121032, 10121050, 10121113, 10121131, 10121203, 10121221, 10121302, 10121320, 10121410, 10122004, 10122022, 10122040, 10122112, 10122130, 10122211, 10122301, 10122400, 10123012, 10123030, 10123111, 10123201, 10123300, 10124011, 10124101, 10124200, 10125010, 10126000, 10130014, 10130032, 10130050, 10130113, 10130131, 10130203, 10130221, 10130302, 10130320, 10130410, 10131004, 10131022, 10131040, 10131112, 10131130, 10131211, 10131301, 10131400, 10132012, 10132030, 10132111, 10132201, 10132300, 10133011, 10133101, 10133200, 10134010, 10135000, 10140013, 10140031, 10140103, 10140121, 10140202, 10140220, 10140310, 10141003, 10141021, 10141102, 10141120, 10141210, 10142002, 10142020, 10142110, 10143001, 10143100, 10150003, 10150021, 10150102, 10150120, 10150210, 10151002, 10151020, 10151110, 10152001, 10152100, 10160002, 10160020, 10160110, 10161001, 10161100, 10170001, 10170100, 10180000, 10200016, 10200034, 10200052, 10200070, 10200115, 10200133, 10200151, 10200205, 10200223, 10200241, 10200304, 10200322, 10200340, 10200412, 10200430, 10200511, 10200601, 10200700, 10201015, 10201033, 10201051, 10201105, 10201123, 10201141, 10201204, 10201222, 10201240, 10201312, 10201330, 10201411, 10201501, 10201600, 10202014, 10202032, 10202050, 10202113, 10202131, 10202203, 10202221, 10202302, 10202320, 10202410, 10203004, 10203022, 10203040, 10203112, 10203130, 10203211, 10203301, 10203400, 10204012, 10204030, 10204111, 10204201, 10204300, 10205011, 10205101, 10205200, 10206010, 10207000, 10210015, 10210033, 10210051, 10210105, 10210123, 10210141, 10210204, 10210222, 10210240, 10210312, 10210330, 10210411, 10210501, 10210600, 10211014, 10211032, 10211050, 10211113, 10211131, 10211203, 10211221, 10211302, 10211320, 10211410, 10212004, 10212022, 10212040, 10212112, 10212130, 10212211, 10212301, 10212400, 10213012, 10213030, 10213111, 10213201, 10213300, 10214011, 10214101, 10214200, 10215010, 10216000, 10220014, 10220032, 10220050, 10220113, 10220131, 10220203, 10220221, 10220302, 10220320, 10220410, 10221004, 10221022, 10221040, 10221112, 10221130, 10221211, 10221301, 10221400, 10222012, 10222030, 10222111, 10222201, 10222300, 10223011, 10223101, 10223200, 10224010, 10225000, 10230013, 10230031, 10230103, 10230121, 10230202, 10230220, 10230310, 10231003, 10231021, 10231102, 10231120, 10231210, 10232002, 10232020, 10232110, 10233001, 10233100, 10240003, 10240021, 10240102, 10240120, 10240210, 10241002, 10241020, 10241110, 10242001, 10242100, 10250002, 10250020, 10250110, 10251001, 10251100, 10260001, 10260100, 10270000, 10300015, 10300033, 10300051, 10300105, 10300123, 10300141, 10300204, 10300222, 10300240, 10300312, 10300330, 10300411, 10300501, 10300600, 10301014, 10301032, 10301050, 10301113, 10301131, 10301203, 10301221, 10301302, 10301320, 10301410, 10302004, 10302022, 10302040, 10302112, 10302130, 10302211, 10302301, 10302400, 10303012, 10303030, 10303111, 10303201, 10303300, 10304011, 10304101, 10304200, 10305010, 10306000, 10310014, 10310032, 10310050, 10310113, 10310131, 10310203, 10310221, 10310302, 10310320, 10310410, 10311004, 10311022, 10311040, 10311112, 10311130, 10311211, 10311301, 10311400, 10312012, 10312030, 10312111, 10312201, 10312300, 10313011, 10313101, 10313200, 10314010, 10315000, 10320013, 10320031, 10320103, 10320121, 10320202, 10320220, 10320310, 10321003, 10321021, 10321102, 10321120, 10321210, 10322002, 10322020, 10322110, 10323001, 10323100, 10330003, 10330021, 10330102, 10330120, 10330210, 10331002, 10331020, 10331110, 10332001, 10332100, 10340002, 10340020, 10340110, 10341001, 10341100, 10350001, 10350100, 10360000, 10400014, 10400032, 10400050, 10400113, 10400131, 10400203, 10400221, 10400302, 10400320, 10400410, 10401004, 10401022, 10401040, 10401112, 10401130, 10401211, 10401301, 10401400, 10402012, 10402030, 10402111, 10402201, 10402300, 10403011, 10403101, 10403200, 10404010, 10405000, 10410013, 10410031, 10410103, 10410121, 10410202, 10410220, 10410310, 10411003, 10411021, 10411102, 10411120, 10411210, 10412002, 10412020, 10412110, 10413001, 10413100, 10420003, 10420021, 10420102, 10420120, 10420210, 10421002, 10421020, 10421110, 10422001, 10422100, 10430002, 10430020, 10430110, 10431001, 10431100, 10440001, 10440100, 10450000, 10500013, 10500031, 10500103, 10500121, 10500202, 10500220, 10500310, 10501003, 10501021, 10501102, 10501120, 10501210, 10502002, 10502020, 10502110, 10503001, 10503100, 10510003, 10510021, 10510102, 10510120, 10510210, 10511002, 10511020, 10511110, 10512001, 10512100, 10520002, 10520020, 10520110, 10521001, 10521100, 10530001, 10530100, 10540000, 10600012, 10600030, 10600111, 10600201, 10600300, 10601011, 10601101, 10601200, 10602010, 10603000, 10610011, 10610101, 10610200, 10611010, 10612000, 10620010, 10621000, 10700002, 10700020, 10700110, 10701001, 10701100, 10710001, 10710100, 10720000, 10800010]
if k % 2 == 1:
	print(l[k // 2])
else:
	for i in range(l[k // 2 - 1] + 1, 10 ** 18):
		S = 0
		for j in str(i):
			S += int(j)
		if S == 10:
			print(i)
			break


k = int(input())

def valid(l):
	s = 0
	for (i, n) in enumerate(l):
		s += n
		if s > 10:
			return i + 1
	if s == 10:
		return -1
	else:
		return 0

def digits(n):
	l = []
	while n > 0:
		r = n % 10
		l.append(r)
		n = n // 10
	return list(reversed(l))
i = 19
n = 0
while True:
	d = digits(i)
	r = valid(d)
	if r < 0:
		n += 1
		i += 1
	else:
		if r > 0:
			r = len(d) - r
		i = (i // 10 ** r + 1) * 10 ** r
	if n == k:
		print(i - 1)
		break


is_perfect = lambda n: sum([int(a) for a in str(n)]) == 10
k = int(input())
i = 19
while k > 0:
	if is_perfect(i):
		k -= 1
		if k == 0:
			break
	i += 9
print(i)


def s(x):
	ans = 0
	while x:
		ans += x % 10
		x = x // 10
	return ans
k = int(input())
n = 10
while k:
	n += 9
	if s(n) == 10:
		k -= 1
print(n)


k = int(input())
num = 10
mas = [6200101, 6200110, 6200200, 6201001, 6201010, 6201100, 6202000, 6210001, 6210010, 6210100, 6211000, 6220000, 6300001, 6300010, 6300100, 6301000, 6310000, 6400000, 7000003, 7000012, 7000021, 7000030, 7000102, 7000111, 7000120, 7000201, 7000210, 7000300, 7001002, 7001011, 7001020, 7001101, 7001110, 7001200, 7002001, 7002010, 7002100, 7003000, 7010002, 7010011, 7010020, 7010101, 7010110, 7010200, 7011001, 7011010, 7011100, 7012000, 7020001, 7020010, 7020100, 7021000, 7030000, 7100002, 7100011, 7100020, 7100101, 7100110, 7100200, 7101001, 7101010, 7101100, 7102000, 7110001, 7110010, 7110100, 7111000, 7120000, 7200001, 7200010, 7200100, 7201000, 7210000, 7300000, 8000002, 8000011, 8000020, 8000101, 8000110, 8000200, 8001001, 8001010, 8001100, 8002000, 8010001, 8010010, 8010100, 8011000, 8020000, 8100001, 8100010, 8100100, 8101000, 8110000, 8200000, 9000001, 9000010, 9000100, 9001000, 9010000, 9100000, 10000009, 10000018, 10000027, 10000036, 10000045, 10000054, 10000063, 10000072, 10000081, 10000090, 10000108, 10000117, 10000126, 10000135, 10000144, 10000153, 10000162, 10000171, 10000180, 10000207, 10000216, 10000225, 10000234, 10000243, 10000252, 10000261, 10000270, 10000306, 10000315, 10000324, 10000333, 10000342, 10000351, 10000360, 10000405, 10000414, 10000423, 10000432, 10000441, 10000450, 10000504, 10000513, 10000522, 10000531, 10000540, 10000603, 10000612, 10000621, 10000630, 10000702, 10000711, 10000720, 10000801, 10000810, 10000900, 10001008, 10001017, 10001026, 10001035, 10001044, 10001053, 10001062, 10001071, 10001080, 10001107, 10001116, 10001125, 10001134, 10001143, 10001152, 10001161, 10001170, 10001206, 10001215, 10001224, 10001233, 10001242, 10001251, 10001260, 10001305, 10001314, 10001323, 10001332, 10001341, 10001350, 10001404, 10001413, 10001422, 10001431, 10001440, 10001503, 10001512, 10001521, 10001530, 10001602, 10001611, 10001620, 10001701, 10001710, 10001800, 10002007, 10002016, 10002025, 10002034, 10002043, 10002052, 10002061, 10002070, 10002106, 10002115, 10002124, 10002133, 10002142, 10002151, 10002160, 10002205, 10002214, 10002223, 10002232, 10002241, 10002250, 10002304, 10002313, 10002322, 10002331, 10002340, 10002403, 10002412, 10002421, 10002430, 10002502, 10002511, 10002520, 10002601, 10002610, 10002700, 10003006, 10003015, 10003024, 10003033, 10003042, 10003051, 10003060, 10003105, 10003114, 10003123, 10003132, 10003141, 10003150, 10003204, 10003213, 10003222, 10003231, 10003240, 10003303, 10003312, 10003321, 10003330, 10003402, 10003411, 10003420, 10003501, 10003510, 10003600, 10004005, 10004014, 10004023, 10004032, 10004041, 10004050, 10004104, 10004113, 10004122, 10004131, 10004140, 10004203, 10004212, 10004221, 10004230, 10004302, 10004311, 10004320, 10004401, 10004410, 10004500, 10005004, 10005013, 10005022, 10005031, 10005040, 10005103, 10005112, 10005121, 10005130, 10005202, 10005211, 10005220, 10005301, 10005310, 10005400, 10006003, 10006012, 10006021, 10006030, 10006102, 10006111, 10006120, 10006201, 10006210, 10006300, 10007002, 10007011, 10007020, 10007101, 10007110, 10007200, 10008001, 10008010, 10008100, 10009000, 10010008, 10010017, 10010026, 10010035, 10010044, 10010053, 10010062, 10010071, 10010080, 10010107, 10010116, 10010125, 10010134, 10010143, 10010152, 10010161, 10010170, 10010206, 10010215, 10010224, 10010233, 10010242, 10010251, 10010260, 10010305, 10010314, 10010323, 10010332, 10010341, 10010350, 10010404, 10010413, 10010422, 10010431, 10010440, 10010503, 10010512, 10010521, 10010530, 10010602, 10010611, 10010620, 10010701, 10010710, 10010800, 10011007, 10011016, 10011025, 10011034, 10011043, 10011052, 10011061, 10011070, 10011106, 10011115, 10011124, 10011133, 10011142, 10011151, 10011160, 10011205, 10011214, 10011223, 10011232, 10011241, 10011250, 10011304, 10011313, 10011322, 10011331, 10011340, 10011403, 10011412, 10011421, 10011430, 10011502, 10011511, 10011520, 10011601, 10011610, 10011700, 10012006, 10012015, 10012024, 10012033, 10012042, 10012051, 10012060, 10012105, 10012114, 10012123, 10012132, 10012141, 10012150, 10012204, 10012213, 10012222, 10012231, 10012240, 10012303, 10012312, 10012321, 10012330, 10012402, 10012411, 10012420, 10012501, 10012510, 10012600, 10013005, 10013014, 10013023, 10013032, 10013041, 10013050, 10013104, 10013113, 10013122, 10013131, 10013140, 10013203, 10013212, 10013221, 10013230, 10013302, 10013311, 10013320, 10013401, 10013410, 10013500, 10014004, 10014013, 10014022, 10014031, 10014040, 10014103, 10014112, 10014121, 10014130, 10014202, 10014211, 10014220, 10014301, 10014310, 10014400, 10015003, 10015012, 10015021, 10015030, 10015102, 10015111, 10015120, 10015201, 10015210, 10015300, 10016002, 10016011, 10016020, 10016101, 10016110, 10016200, 10017001, 10017010, 10017100, 10018000, 10020007, 10020016, 10020025, 10020034, 10020043, 10020052, 10020061, 10020070, 10020106, 10020115, 10020124, 10020133, 10020142, 10020151, 10020160, 10020205, 10020214, 10020223, 10020232, 10020241, 10020250, 10020304, 10020313, 10020322, 10020331, 10020340, 10020403, 10020412, 10020421, 10020430, 10020502, 10020511, 10020520, 10020601, 10020610, 10020700, 10021006, 10021015, 10021024, 10021033, 10021042, 10021051, 10021060, 10021105, 10021114, 10021123, 10021132, 10021141, 10021150, 10021204, 10021213, 10021222, 10021231, 10021240, 10021303, 10021312, 10021321, 10021330, 10021402, 10021411, 10021420, 10021501, 10021510, 10021600, 10022005, 10022014, 10022023, 10022032, 10022041, 10022050, 10022104, 10022113, 10022122, 10022131, 10022140, 10022203, 10022212, 10022221, 10022230, 10022302, 10022311, 10022320, 10022401, 10022410, 10022500, 10023004, 10023013, 10023022, 10023031, 10023040, 10023103, 10023112, 10023121, 10023130, 10023202, 10023211, 10023220, 10023301, 10023310, 10023400, 10024003, 10024012, 10024021, 10024030, 10024102, 10024111, 10024120, 10024201, 10024210, 10024300, 10025002, 10025011, 10025020, 10025101, 10025110, 10025200, 10026001, 10026010, 10026100, 10027000, 10030006, 10030015, 10030024, 10030033, 10030042, 10030051, 10030060, 10030105, 10030114, 10030123, 10030132, 10030141, 10030150, 10030204, 10030213, 10030222, 10030231, 10030240, 10030303, 10030312, 10030321, 10030330, 10030402, 10030411, 10030420, 10030501, 10030510, 10030600, 10031005, 10031014, 10031023, 10031032, 10031041, 10031050, 10031104, 10031113, 10031122, 10031131, 10031140, 10031203, 10031212, 10031221, 10031230, 10031302, 10031311, 10031320, 10031401, 10031410, 10031500, 10032004, 10032013, 10032022, 10032031, 10032040, 10032103, 10032112, 10032121, 10032130, 10032202, 10032211, 10032220, 10032301, 10032310, 10032400, 10033003, 10033012, 10033021, 10033030, 10033102, 10033111, 10033120, 10033201, 10033210, 10033300, 10034002, 10034011, 10034020, 10034101, 10034110, 10034200, 10035001, 10035010, 10035100, 10036000, 10040005, 10040014, 10040023, 10040032, 10040041, 10040050, 10040104, 10040113, 10040122, 10040131, 10040140, 10040203, 10040212, 10040221, 10040230, 10040302, 10040311, 10040320, 10040401, 10040410, 10040500, 10041004, 10041013, 10041022, 10041031, 10041040, 10041103, 10041112, 10041121, 10041130, 10041202, 10041211, 10041220, 10041301, 10041310, 10041400, 10042003, 10042012, 10042021, 10042030, 10042102, 10042111, 10042120, 10042201, 10042210, 10042300, 10043002, 10043011, 10043020, 10043101, 10043110, 10043200, 10044001, 10044010, 10044100, 10045000, 10050004, 10050013, 10050022, 10050031, 10050040, 10050103, 10050112, 10050121, 10050130, 10050202, 10050211, 10050220, 10050301, 10050310, 10050400, 10051003, 10051012, 10051021, 10051030, 10051102, 10051111, 10051120, 10051201, 10051210, 10051300, 10052002, 10052011, 10052020, 10052101, 10052110, 10052200, 10053001, 10053010, 10053100, 10054000, 10060003, 10060012, 10060021, 10060030, 10060102, 10060111, 10060120, 10060201, 10060210, 10060300, 10061002, 10061011, 10061020, 10061101, 10061110, 10061200, 10062001, 10062010, 10062100, 10063000, 10070002, 10070011, 10070020, 10070101, 10070110, 10070200, 10071001, 10071010, 10071100, 10072000, 10080001, 10080010, 10080100, 10081000, 10090000, 10100008, 10100017, 10100026, 10100035, 10100044, 10100053, 10100062, 10100071, 10100080, 10100107, 10100116, 10100125, 10100134, 10100143, 10100152, 10100161, 10100170, 10100206, 10100215, 10100224, 10100233, 10100242, 10100251, 10100260, 10100305, 10100314, 10100323, 10100332, 10100341, 10100350, 10100404, 10100413, 10100422, 10100431, 10100440, 10100503, 10100512, 10100521, 10100530, 10100602, 10100611, 10100620, 10100701, 10100710, 10100800, 10101007, 10101016, 10101025, 10101034, 10101043, 10101052, 10101061, 10101070, 10101106, 10101115, 10101124, 10101133, 10101142, 10101151, 10101160, 10101205, 10101214, 10101223, 10101232, 10101241, 10101250, 10101304, 10101313, 10101322, 10101331, 10101340, 10101403, 10101412, 10101421, 10101430, 10101502, 10101511, 10101520, 10101601, 10101610, 10101700, 10102006, 10102015, 10102024, 10102033, 10102042, 10102051, 10102060, 10102105, 10102114, 10102123, 10102132, 10102141, 10102150, 10102204, 10102213, 10102222, 10102231, 10102240, 10102303, 10102312, 10102321, 10102330, 10102402, 10102411, 10102420, 10102501, 10102510, 10102600, 10103005, 10103014, 10103023, 10103032, 10103041, 10103050, 10103104, 10103113, 10103122, 10103131, 10103140, 10103203, 10103212, 10103221, 10103230, 10103302, 10103311, 10103320, 10103401, 10103410, 10103500, 10104004, 10104013, 10104022, 10104031, 10104040, 10104103, 10104112, 10104121, 10104130, 10104202, 10104211, 10104220, 10104301, 10104310, 10104400, 10105003, 10105012, 10105021, 10105030, 10105102, 10105111, 10105120, 10105201, 10105210, 10105300, 10106002, 10106011, 10106020, 10106101, 10106110, 10106200, 10107001, 10107010, 10107100, 10108000, 10110007, 10110016, 10110025, 10110034, 10110043, 10110052, 10110061, 10110070, 10110106, 10110115, 10110124, 10110133, 10110142, 10110151, 10110160, 10110205, 10110214, 10110223, 10110232, 10110241, 10110250, 10110304, 10110313, 10110322, 10110331, 10110340, 10110403, 10110412, 10110421, 10110430, 10110502, 10110511, 10110520, 10110601, 10110610, 10110700, 10111006, 10111015, 10111024, 10111033, 10111042, 10111051, 10111060, 10111105, 10111114, 10111123, 10111132, 10111141, 10111150, 10111204, 10111213, 10111222, 10111231, 10111240, 10111303, 10111312, 10111321, 10111330, 10111402, 10111411, 10111420, 10111501, 10111510, 10111600, 10112005, 10112014, 10112023, 10112032, 10112041, 10112050, 10112104, 10112113, 10112122, 10112131, 10112140, 10112203, 10112212, 10112221, 10112230, 10112302, 10112311, 10112320, 10112401, 10112410, 10112500, 10113004, 10113013, 10113022, 10113031, 10113040, 10113103, 10113112, 10113121, 10113130, 10113202, 10113211, 10113220, 10113301, 10113310, 10113400, 10114003, 10114012, 10114021, 10114030, 10114102, 10114111, 10114120, 10114201, 10114210, 10114300, 10115002, 10115011, 10115020, 10115101, 10115110, 10115200, 10116001, 10116010, 10116100, 10117000, 10120006, 10120015, 10120024, 10120033, 10120042, 10120051, 10120060, 10120105, 10120114, 10120123, 10120132, 10120141, 10120150, 10120204, 10120213, 10120222, 10120231, 10120240, 10120303, 10120312, 10120321, 10120330, 10120402, 10120411, 10120420, 10120501, 10120510, 10120600, 10121005, 10121014, 10121023, 10121032, 10121041, 10121050, 10121104, 10121113, 10121122, 10121131, 10121140, 10121203, 10121212, 10121221, 10121230, 10121302, 10121311, 10121320, 10121401, 10121410, 10121500, 10122004, 10122013, 10122022, 10122031, 10122040, 10122103, 10122112, 10122121, 10122130, 10122202, 10122211, 10122220, 10122301, 10122310, 10122400, 10123003, 10123012, 10123021, 10123030, 10123102, 10123111, 10123120, 10123201, 10123210, 10123300, 10124002, 10124011, 10124020, 10124101, 10124110, 10124200, 10125001, 10125010, 10125100, 10126000, 10130005, 10130014, 10130023, 10130032, 10130041, 10130050, 10130104, 10130113, 10130122, 10130131, 10130140, 10130203, 10130212, 10130221, 10130230, 10130302, 10130311, 10130320, 10130401, 10130410, 10130500, 10131004, 10131013, 10131022, 10131031, 10131040, 10131103, 10131112, 10131121, 10131130, 10131202, 10131211, 10131220, 10131301, 10131310, 10131400, 10132003, 10132012, 10132021, 10132030, 10132102, 10132111, 10132120, 10132201, 10132210, 10132300, 10133002, 10133011, 10133020, 10133101, 10133110, 10133200, 10134001, 10134010, 10134100, 10135000, 10140004, 10140013, 10140022, 10140031, 10140040, 10140103, 10140112, 10140121, 10140130, 10140202, 10140211, 10140220, 10140301, 10140310, 10140400, 10141003, 10141012, 10141021, 10141030, 10141102, 10141111, 10141120, 10141201, 10141210, 10141300, 10142002, 10142011, 10142020, 10142101, 10142110, 10142200, 10143001, 10143010, 10143100, 10144000, 10150003, 10150012, 10150021, 10150030, 10150102, 10150111, 10150120, 10150201, 10150210, 10150300, 10151002, 10151011, 10151020, 10151101, 10151110, 10151200, 10152001, 10152010, 10152100, 10153000, 10160002, 10160011, 10160020, 10160101, 10160110, 10160200, 10161001, 10161010, 10161100, 10162000, 10170001, 10170010, 10170100, 10171000, 10180000, 10200007, 10200016, 10200025, 10200034, 10200043, 10200052, 10200061, 10200070, 10200106, 10200115, 10200124, 10200133, 10200142, 10200151, 10200160, 10200205, 10200214, 10200223, 10200232, 10200241, 10200250, 10200304, 10200313, 10200322, 10200331, 10200340, 10200403, 10200412, 10200421, 10200430, 10200502, 10200511, 10200520, 10200601, 10200610, 10200700, 10201006, 10201015, 10201024, 10201033, 10201042, 10201051, 10201060, 10201105, 10201114, 10201123, 10201132, 10201141, 10201150, 10201204, 10201213, 10201222, 10201231, 10201240, 10201303, 10201312, 10201321, 10201330, 10201402, 10201411, 10201420, 10201501, 10201510, 10201600, 10202005, 10202014, 10202023, 10202032, 10202041, 10202050, 10202104, 10202113, 10202122, 10202131, 10202140, 10202203, 10202212, 10202221, 10202230, 10202302, 10202311, 10202320, 10202401, 10202410, 10202500, 10203004, 10203013, 10203022, 10203031, 10203040, 10203103, 10203112, 10203121, 10203130, 10203202, 10203211, 10203220, 10203301, 10203310, 10203400, 10204003, 10204012, 10204021, 10204030, 10204102, 10204111, 10204120, 10204201, 10204210, 10204300, 10205002, 10205011, 10205020, 10205101, 10205110, 10205200, 10206001, 10206010, 10206100, 10207000, 10210006, 10210015, 10210024, 10210033, 10210042, 10210051, 10210060, 10210105, 10210114, 10210123, 10210132, 10210141, 10210150, 10210204, 10210213, 10210222, 10210231, 10210240, 10210303, 10210312, 10210321, 10210330, 10210402, 10210411, 10210420, 10210501, 10210510, 10210600, 10211005, 10211014, 10211023, 10211032, 10211041, 10211050, 10211104, 10211113, 10211122, 10211131, 10211140, 10211203, 10211212, 10211221, 10211230, 10211302, 10211311, 10211320, 10211401, 10211410, 10211500, 10212004, 10212013, 10212022, 10212031, 10212040, 10212103, 10212112, 10212121, 10212130, 10212202, 10212211, 10212220, 10212301, 10212310, 10212400, 10213003, 10213012, 10213021, 10213030, 10213102, 10213111, 10213120, 10213201, 10213210, 10213300, 10214002, 10214011, 10214020, 10214101, 10214110, 10214200, 10215001, 10215010, 10215100, 10216000, 10220005, 10220014, 10220023, 10220032, 10220041, 10220050, 10220104, 10220113, 10220122, 10220131, 10220140, 10220203, 10220212, 10220221, 10220230, 10220302, 10220311, 10220320, 10220401, 10220410, 10220500, 10221004, 10221013, 10221022, 10221031, 10221040, 10221103, 10221112, 10221121, 10221130, 10221202, 10221211, 10221220, 10221301, 10221310, 10221400, 10222003, 10222012, 10222021, 10222030, 10222102, 10222111, 10222120, 10222201, 10222210, 10222300, 10223002, 10223011, 10223020, 10223101, 10223110, 10223200, 10224001, 10224010, 10224100, 10225000, 10230004, 10230013, 10230022, 10230031, 10230040, 10230103, 10230112, 10230121, 10230130, 10230202, 10230211, 10230220, 10230301, 10230310, 10230400, 10231003, 10231012, 10231021, 10231030, 10231102, 10231111, 10231120, 10231201, 10231210, 10231300, 10232002, 10232011, 10232020, 10232101, 10232110, 10232200, 10233001, 10233010, 10233100, 10234000, 10240003, 10240012, 10240021, 10240030, 10240102, 10240111, 10240120, 10240201, 10240210, 10240300, 10241002, 10241011, 10241020, 10241101, 10241110, 10241200, 10242001, 10242010, 10242100, 10243000, 10250002, 10250011, 10250020, 10250101, 10250110, 10250200, 10251001, 10251010, 10251100, 10252000, 10260001, 10260010, 10260100, 10261000, 10270000, 10300006, 10300015, 10300024, 10300033, 10300042, 10300051, 10300060, 10300105, 10300114, 10300123, 10300132, 10300141, 10300150, 10300204, 10300213, 10300222, 10300231, 10300240, 10300303, 10300312, 10300321, 10300330, 10300402, 10300411, 10300420, 10300501, 10300510, 10300600, 10301005, 10301014, 10301023, 10301032, 10301041, 10301050, 10301104, 10301113, 10301122, 10301131, 10301140, 10301203, 10301212, 10301221, 10301230, 10301302, 10301311, 10301320, 10301401, 10301410, 10301500, 10302004, 10302013, 10302022, 10302031, 10302040, 10302103, 10302112, 10302121, 10302130, 10302202, 10302211, 10302220, 10302301, 10302310, 10302400, 10303003, 10303012, 10303021, 10303030, 10303102, 10303111, 10303120, 10303201, 10303210, 10303300, 10304002, 10304011, 10304020, 10304101, 10304110, 10304200, 10305001, 10305010, 10305100, 10306000, 10310005, 10310014, 10310023, 10310032, 10310041, 10310050, 10310104, 10310113, 10310122, 10310131, 10310140, 10310203, 10310212, 10310221, 10310230, 10310302, 10310311, 10310320, 10310401, 10310410, 10310500, 10311004, 10311013, 10311022, 10311031, 10311040, 10311103, 10311112, 10311121, 10311130, 10311202, 10311211, 10311220, 10311301, 10311310, 10311400, 10312003, 10312012, 10312021, 10312030, 10312102, 10312111, 10312120, 10312201, 10312210, 10312300, 10313002, 10313011, 10313020, 10313101, 10313110, 10313200, 10314001, 10314010, 10314100, 10315000, 10320004, 10320013, 10320022, 10320031, 10320040, 10320103, 10320112, 10320121, 10320130, 10320202, 10320211, 10320220, 10320301, 10320310, 10320400, 10321003, 10321012, 10321021, 10321030, 10321102, 10321111, 10321120, 10321201, 10321210, 10321300, 10322002, 10322011, 10322020, 10322101, 10322110, 10322200, 10323001, 10323010, 10323100, 10324000, 10330003, 10330012, 10330021, 10330030, 10330102, 10330111, 10330120, 10330201, 10330210, 10330300, 10331002, 10331011, 10331020, 10331101, 10331110, 10331200, 10332001, 10332010, 10332100, 10333000, 10340002, 10340011, 10340020, 10340101, 10340110, 10340200, 10341001, 10341010, 10341100, 10342000, 10350001, 10350010, 10350100, 10351000, 10360000, 10400005, 10400014, 10400023, 10400032, 10400041, 10400050, 10400104, 10400113, 10400122, 10400131, 10400140, 10400203, 10400212, 10400221, 10400230, 10400302, 10400311, 10400320, 10400401, 10400410, 10400500, 10401004, 10401013, 10401022, 10401031, 10401040, 10401103, 10401112, 10401121, 10401130, 10401202, 10401211, 10401220, 10401301, 10401310, 10401400, 10402003, 10402012, 10402021, 10402030, 10402102, 10402111, 10402120, 10402201, 10402210, 10402300, 10403002, 10403011, 10403020, 10403101, 10403110, 10403200, 10404001, 10404010, 10404100, 10405000, 10410004, 10410013, 10410022, 10410031, 10410040, 10410103, 10410112, 10410121, 10410130, 10410202, 10410211, 10410220, 10410301, 10410310, 10410400, 10411003, 10411012, 10411021, 10411030, 10411102, 10411111, 10411120, 10411201, 10411210, 10411300, 10412002, 10412011, 10412020, 10412101, 10412110, 10412200, 10413001, 10413010, 10413100, 10414000, 10420003, 10420012, 10420021, 10420030, 10420102, 10420111, 10420120, 10420201, 10420210, 10420300, 10421002, 10421011, 10421020, 10421101, 10421110, 10421200, 10422001, 10422010, 10422100, 10423000, 10430002, 10430011, 10430020, 10430101, 10430110, 10430200, 10431001, 10431010, 10431100, 10432000, 10440001, 10440010, 10440100, 10441000, 10450000, 10500004, 10500013, 10500022, 10500031, 10500040, 10500103, 10500112, 10500121, 10500130, 10500202, 10500211, 10500220, 10500301, 10500310, 10500400, 10501003, 10501012, 10501021, 10501030, 10501102, 10501111, 10501120, 10501201, 10501210, 10501300, 10502002, 10502011, 10502020, 10502101, 10502110, 10502200, 10503001, 10503010, 10503100, 10504000, 10510003, 10510012, 10510021, 10510030, 10510102, 10510111, 10510120, 10510201, 10510210, 10510300, 10511002, 10511011, 10511020, 10511101, 10511110, 10511200, 10512001, 10512010, 10512100, 10513000, 10520002, 10520011, 10520020, 10520101, 10520110, 10520200, 10521001, 10521010, 10521100, 10522000, 10530001, 10530010, 10530100, 10531000, 10540000, 10600003, 10600012, 10600021, 10600030, 10600102, 10600111, 10600120, 10600201, 10600210, 10600300, 10601002, 10601011, 10601020, 10601101, 10601110, 10601200, 10602001, 10602010, 10602100, 10603000, 10610002, 10610011, 10610020, 10610101, 10610110, 10610200, 10611001, 10611010, 10611100, 10612000, 10620001, 10620010, 10620100, 10621000, 10630000, 10700002, 10700011, 10700020, 10700101, 10700110, 10700200, 10701001, 10701010, 10701100, 10702000, 10710001, 10710010, 10710100, 10711000, 10720000, 10800001, 10800010, 10800100]
if k <= 7900:
	for i in range(k):
		num += 9
		if sum(map(int, str(num))) != 10:
			while sum(map(int, str(num))) != 10:
				num += 9
	print(num)
else:
	print(mas[k - 7901])


def digi(a):
	s = 0
	for i in map(int, str(a)):
		s += i
	return s
x = int(input())
i = 10
while x:
	i += 9
	if digi(i) == 10:
		x -= 1
print(i)


n = int(input())
s = 10
while n > 0:
	s += 9
	c = 0
	m = s
	while m > 0:
		c += int(m % 10)
		m = int(m / 10)
	if c == 10:
		n -= 1
print(s)


import sys
f = sys.stdin
d = [[0] * 11 for _ in range(11)]
d[0][0] = 1
for i in range(10):
	for j in range(11):
		for k in range(10):
			if j + k <= 10:
				d[i + 1][j + k] += d[i][j]
target = int(f.readline())
tt = target
target -= 1
val = 10
ans = ''
for i in range(10):
	ii = 9 - i
	for j in range(val + 1):
		if j == 10:
			continue
		jj = val - j
		if d[ii][jj] <= target:
			target -= d[ii][jj]
		else:
			val = jj
			ans += str(j)
			break
print(int(ans))


k = int(input())
n = 0
for a in range(10):
	for b in range(10):
		if a + b > 10:
			continue
		for c in range(10):
			if a + b + c > 10:
				continue
			for d in range(10):
				if a + b + c + d > 10:
					continue
				for e in range(10):
					if a + b + c + d + e > 10:
						continue
					for f in range(10):
						if a + b + c + d + e + f > 10:
							continue
						for g in range(10):
							if a + b + c + d + e + f + g > 10:
								continue
							for h in range(10):
								v = a + b + c + d + e + f + g + h
								if v == 10:
									n += 1
									if n == k:
										num = a * 10000000 + b * 1000000 + c * 100000 + d * 10000 + e * 1000 + f * 100 + g * 10 + h
										print(num, end='')
										exit(0)


def sum_digits(x):
	result = 0
	while x:
		result += x % 10
		x //= 10
	return result
k = int(input())
x = 1
while k:
	x += 1
	if sum_digits(x) == 10:
		k -= 1
print(x)


def kTHprefectNO(k):
	i = 19
	c = 0
	while True:
		z = 0
		p = i
		while p > 0:
			z += p % 10
			p = p // 10
		if z == 10:
			c += 1
			if c == k:
				break
		i += 9
	return i
k = int(input())
x = kTHprefectNO(k)
print(x)


from collections import defaultdict
k = int(input())
d = defaultdict(list)
for i in range(10):
	d[1, i].append(i)
mx = 10
pw = 1
for digs in range(2, mx):
	pw *= 10
	for sm in range(11):
		for curr in range(10):
			for num in d[digs - 1, sm - curr]:
				d[digs, sm].append(curr * pw + num)
perfects = sorted(d[mx - 1, 10])
print(perfects[k - 1])


def f(x):
	r = 0
	while x:
		r += x % 10
		x //= 10
	return r
m = int(input())
x = 19
while m > 1:
	x += 9
	if f(x) == 10:
		m -= 1
print(x)


D = {0: 0, 100: 1423, 200: 4006, 300: 10171, 400: 12223, 500: 18010, 600: 22231, 700: 30520, 800: 40150, 900: 51121, 1000: 100036, 1100: 102034, 1200: 106030, 1300: 112024, 1400: 120232, 1500: 126100, 1600: 140230, 1700: 170101, 1800: 202105, 1900: 210322, 2000: 220033, 2100: 230410, 2200: 261100, 2300: 303130, 2400: 313300, 2500: 333100, 2600: 402400, 2700: 421210, 2800: 504010, 2900: 602020, 3000: 1000027, 3100: 1002025, 3200: 1006021, 3300: 1012015, 3400: 1020223, 3500: 1026010, 3600: 1040221, 3700: 1070020, 3800: 1102060, 3900: 1110313, 4000: 1120024, 4100: 1130401, 4200: 1161010, 4300: 1203121, 4400: 1213210, 4500: 1233010, 4600: 1302310, 4700: 1321201, 4800: 1404001, 4900: 1502011, 5000: 2000008, 5100: 2002312, 5200: 2010700, 5300: 2020222, 5400: 2031211, 5500: 2100052, 5600: 2104111, 5700: 2120014, 5800: 2141002, 5900: 2204011, 6000: 2230003, 6100: 2310202, 6200: 2410102, 6300: 3000151, 6400: 3005101, 6500: 3020131, 6600: 3042100, 6700: 3106000, 6800: 3130210, 6900: 3211021, 7000: 3311020, 7100: 4000330, 7200: 4012012, 7300: 4100203, 7400: 4130002, 7500: 4301200, 7600: 5010031, 7700: 5103100, 7800: 6000121, 7900: 6200020, 8000: 9010000, 8100: 10001710, 8200: 10005310, 8300: 10011601, 8400: 10020151, 8500: 10025101, 8600: 10040131, 8700: 10062100, 8800: 10102024, 8900: 10110232, 9000: 10116100, 9100: 10130230, 9200: 10160101, 9300: 10203031, 9400: 10213102, 9500: 10232101, 9600: 10302202, 9700: 10321030, 9800: 10403020, 9900: 10501201, 10000: 10800100}
k = int(input())
start = k - k % 100
i = D[start]
j = start
while j < k:
	i += 1
	if sum((int(d) for d in str(i))) == 10:
		j += 1
print(i)


def sum(a):
	s = 0
	while a:
		s = s + a % 10
		a = a // 10
	return s
x = int(input())
temp = 19
while x > 1:
	temp = temp + 9
	if sum(temp) == 10:
		x = x - 1
print(temp)


def sum(n):
	r = 0
	while n:
		(r, n) = (r + n % 10, n // 10)
	return r
k = int(input())
ans = []
x = 0
for i in range(1, 10800101, 9):
	t = sum(i)
	if t == 10:
		if x == k:
			break
		ans.append(str(i))
		x += 1
print(ans[k - 1])


k = int(input())
j = 0
count = 1

def calc(n):
	ans = 0
	if n:
		ans += n % 10 + calc(n // 10)
	return ans
while True:
	if calc(count) == 10:
		j += 1
		if j == k:
			break
	count += 1
print(count)


aa = set()
for i1 in range(0, 10):
	for i2 in range(min(11 - i1, 10)):
		for i3 in range(min(11 - i1 - i2, 10)):
			for i4 in range(min(11 - i1 - i2 - i3, 10)):
				for i5 in range(min(11 - i1 - i2 - i3 - i4, 10)):
					for i6 in range(min(11 - i1 - i2 - i3 - i4 - i5, 10)):
						for i7 in range(min(11 - i1 - i2 - i3 - i4 - i5 - i6, 10)):
							a = [i1, i2, i3, i4, i5, i6, i7, 10 - i1 - i2 - i3 - i4 - i5 - i6 - i7]
							t = sum([10 ** i * a[i] for i in range(8)])
							aa.add(t)
ans = list(aa)
ans.sort()
k = int(input())
print(ans[k - 1])


k = int(input()) - 1
n = 19
while k > 0:
	n += 9
	if sum(list(map(int, list(str(n))))) == 10:
		k -= 1
print(n)


k = int(input())
lst = []
if k <= 3000:
	a = 10
	i = 0
	while i != k:
		a += 9
		b = str(a)
		b = [int(x) for x in list(b)]
		if sum(b) == 10:
			lst.append(a)
			i += 1
elif k <= 6000:
	a = 1000027
	i = 3000
	while i != k:
		a += 9
		b = str(a)
		b = [int(x) for x in list(b)]
		if sum(b) == 10:
			lst.append(a)
			i += 1
elif k <= 8000:
	a = 2230003
	i = 6000
	while i != k:
		a += 9
		b = str(a)
		b = [int(x) for x in list(b)]
		if sum(b) == 10:
			lst.append(a)
			i += 1
else:
	a = 9010000
	i = 8000
	while i != k:
		a += 9
		b = str(a)
		b = [int(x) for x in list(b)]
		if sum(b) == 10:
			lst.append(a)
			i += 1
print(max(lst))


def sod(n):
	s = 0
	for i in range(len(str(n))):
		r = n % 10
		s = s + r
		n = int(n / 10)
	return s
t = int(input())
i = 1
j = 1
while j <= t:
	x = sod(i)
	if x <= 10:
		a = int(str(i) + str(10 - int(x)))
		j += 1
	i += 1
print(a)


from bisect import bisect_left, bisect_right
from itertools import accumulate

def is_pn(num):
	dc = 0
	while num:
		dc += num % 10
		num //= 10
	return dc == 10
R = lambda : map(int, input().split())
k = int(input())
pn = 0
while k:
	pn += 1
	k -= is_pn(pn)
print(pn)


import random
import math
initial = 0

def perfact_number(k, digits, total):
	global initial
	if digits == 1:
		initial += 1
		if initial == k:
			return str(total)
		else:
			return None
	if total == 10:
		start = 1
		end = total - 1
	else:
		start = 0
		end = total
	for i in range(start, end + 1):
		m = perfact_number(k, digits - 1, total - i)
		if m != None:
			return str(i) + str(m)

def main():
	k = int(input())
	global initial
	c = 19
	digits = [1] * 10
	d = 2
	rngs = [0, 9]
	while d < 250:
		prev = 1
		for i in range(10):
			digits[i] += prev
			prev = digits[i]
		rngs.append(sum(digits) - d)
		d += 1
	if k < 0:
		digit = 8
		initial = 8001
	else:
		for i in range(1, len(rngs)):
			if k > rngs[i - 1] and k <= rngs[i]:
				digit = i + 1
				initial = rngs[i - 1]
	p_n = perfact_number(k, digit, 10)
	print(p_n)
main()


n = int(input())
a = 19
while 1:
	z = a
	ans = 0
	while z:
		ans += z % 10
		z //= 10
	if ans == 10:
		n -= 1
		if n <= 0:
			print(a)
			break
	a += 1


n = int(input())
i = 10
ans = 0
while n:
	if n == 0:
		break
	i += 9
	i = str(i)
	c = 0
	for j in i:
		c += int(j)
	if c == 10:
		n -= 1
		ans = i
	i = int(i)
print(ans)


def sum(n):
	ans = 0
	while n > 0:
		ans += n % 10
		n = n // 10
	return ans
n = int(input())
if n > 5000:
	temp = 2000017
	count = 5000
else:
	temp = 28
	count = 1
while count != n:
	if sum(temp) == 10:
		count += 1
	temp += 9
print(temp - 9)


import itertools
k = int(input())

def findNth(n):
	count = 0
	for curr in itertools.count():
		sum = 0
		x = curr
		while x:
			sum = sum + x % 10
			x = x // 10
		if sum == 10:
			count = count + 1
		if count == n:
			return curr
a = findNth(k)
print(a)


def s(x):
	t = 0
	while x:
		t = t + x % 10
		x = x // 10
	return t
n = int(input())
i = 19
k = 1
while k < n:
	i += 9
	if s(i) == 10:
		k += 1
print(str(i))


k = int(input())
start = 1
el = 0
num = []
while el != k:
	li = list(str(start))
	li = list(map(int, li))
	s = sum(li)
	n = len(li)
	pos = 0
	if s > 10:
		while sum(li[0:n - 1]) > 9:
			n -= 1
			pos += 1
		ans = int(''.join(map(str, li[0:n])))
		start = (ans + 1) * 10 ** pos
	else:
		num.append(str(start) + str(10 - s))
		start += 1
		el += 1
print(num[k - 1])


def function(N):
	current = 1
	number = 19
	while current < N:
		number += 9
		if sum((int(x) for x in list(str(number)))) == 10:
			current += 1
	return number
N = int(input())
print(function(N))


def summachisel(n):
	s = 0
	while n > 0:
		s += n % 10
		n = n // 10
	return s
k = int(input())
d = 0
x = 1
while k > d:
	x += 1
	if summachisel(x) == 10:
		d += 1
print(x)


k = int(input())
if k < 3000:
	count = 0
	for y in range(19, 1000027, 9):
		if sum(list(map(int, str(y)))) == 10:
			count += 1
		if count == k:
			print(y)
			break
elif 3000 <= k < 6000:
	count = 2999
	for y in range(1000027, 2230003, 9):
		if sum(list(map(int, str(y)))) == 10:
			count += 1
		if count == k:
			print(y)
			break
elif 6000 <= k < 8000:
	count = 5999
	for y in range(2230003, 9010000, 9):
		if sum(list(map(int, str(y)))) == 10:
			count += 1
		if count == k:
			print(y)
			break
elif 8000 <= k <= 10000:
	count = 7999
	for y in range(9010000, 10800109, 9):
		if sum(list(map(int, str(y)))) == 10:
			count += 1
		if count == k:
			print(y)
			break
elif k == 9999:
	print(10800010)


ar = []

def generate(n, s):
	if len(s) > 8:
		return
	if n == 0:
		ar.append(int(s))
	for x in range(0, n + 1):
		generate(n - x, s + str(x))
	ar.append(int(s + str(n)))
for i in range(1, 10):
	generate(10 - i, str(i))
ar = sorted(list(set(ar)))
print(ar[int(input()) - 1])


def per(x):
	x = str(x)
	a = 0
	for i in x:
		a += int(i)
	if a == 10:
		return True
	else:
		return False
k = int(input())
x = 1
s = 19
while x < k:
	s += 9
	if per(s):
		x += 1
print(s)


kInt = int(input())
perfect = 18
sum1 = 0
count = 0
while sum1 != kInt:
	perfect += 1
	count = 0
	i = perfect
	while i != 0:
		count += i % 10
		i = i // 10
	if count == 10:
		sum1 += 1
print(perfect)


n = int(input())
if n > 8750:
	l = 10100431
	k = 8750
elif n > 7500:
	l = 4301200
	k = 7500
elif n > 6250:
	l = 2503000
	k = 6250
elif n > 5000:
	l = 2000008
	k = 5000
elif n > 2500:
	l = 333100
	k = 2500
else:
	l = 10
	k = 0
while k != n:
	l += 9
	if sum(map(int, list(str(l)))) == 10:
		k += 1
print(l)


n = int(input())

def sum(n):
	t = 0
	while n != 0:
		t = t + n % 10
		n = n // 10
	return t
i = 0
j = n
while j != 0:
	t = sum(i)
	if t <= 10 and t != 0:
		j = j - 1
	if j == 0:
		print(str(i) + str(10 - t))
	i = i + 1


import sys
import collections
input = sys.stdin.readline

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

def rint():
	return int(input().strip())

def rintas():
	return [int(i) for i in input().strip().split()]

def gcd(a, b):
	if a == 0:
		return b
	return gcd(a % b, a)
n = rint()
if n == 1:
	print(19)
else:
	i = 19
	while n > 0:
		t = i
		s = 0
		while t > 0:
			s += t % 10
			t = t // 10
		if s == 10:
			n -= 1
		if n == 0:
			print(i)
			exit()
		i = i + 1


nums = set()

def generate(missing, num):
	if int(num) > 10 ** 8:
		return
	if missing == 0:
		nums.add(int(num))
	for k in range(missing + 1):
		generate(missing - k, num + str(k))
for i in range(1, 10):
	generate(10 - i, str(i))
nums2 = list(nums)
nums2.sort()
k = int(input())
print(nums2[k - 1])


from collections import defaultdict
import sys

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

def iinput():
	return int(input())

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

def listinput():
	return list(map(int, input().split()))
init = 10
n = iinput()
while n:
	init += 9
	if sum(map(int, str(init))) == 10:
		n -= 1
print(init)


def sum(x):
	t = 0
	while x:
		if t > 10:
			break
		t += x % 10
		x //= 10
	return t
k = int(input())
i = 19
while k - 1:
	i += 9
	if sum(i) == 10:
		k -= 1
print(i)


k = int(input())
i = 19
found = 0
while True:
	if sum((int(j) for j in list(str(i)))) == 10:
		found += 1
	if found == k:
		print(i)
		break
	i += 9


theNumber = int(input())
offset = 0
x = 1
while x < theNumber:
	y = x + offset
	y1 = 0
	while y > 0:
		y1 += y % 10
		y //= 10
	if y1 > 10:
		offset += 1
	else:
		x += 1
y = x + offset
y1 = 0
while y > 0 or y1 > 10:
	if y1 > 10:
		offset += 1
		y = x + offset
		y1 = 0
	y1 += y % 10
	y //= 10
print(str(x + offset) + str(10 - y1))


def s(a):
	l = 0
	while a != 0:
		l += a % 10
		a //= 10
	return l
k = int(input())
f = 0
for i in range(1, 100000000):
	if s(i) == 10:
		f += 1
	if f == k:
		k = i
		break
print(k)


def isPerfect(k):
	t = 0
	while k:
		t += k % 10
		k //= 10
	return t == 10
n = int(input())
a = 10
while n:
	a += 9
	n -= [0, 1][isPerfect(a)]
print(a)


k = int(input())

def DigitSum(n):
	res = 0
	while n > 0:
		res += n % 10
		n //= 10
		if res > 10:
			return 100
	return res

def IsPretty(n):
	return DigitSum(n) == 10
i = 10
while k > 0:
	i += 9
	if IsPretty(i):
		k -= 1
print(i)


k = int(input())

def s(x):
	r = 0
	while x:
		r += x % 10
		x //= 10
	return r
res = 19
if k >= 8000:
	res = 9010000
	k -= 7999
if k > 7500:
	res = 4302001
	k -= 7500
if k > 5000:
	res = 2000017
	k -= 5000
while k > 1:
	res += 9
	if s(res) == 10:
		k -= 1
print(res)


import sys
import os
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')
mod = 10 ** 9 + 7

def lcm(x, y):
	return x * y / gcd(x, y)

def fact(x, mod=mod):
	ans = 1
	for i in range(1, x + 1):
		ans = ans * i % mod
	return ans

def arr2D(n, m, default=0):
	lst = []
	for i in range(n):
		temp = [default] * m
		lst.append(temp)
	return lst

def sortDictV(x):
	return {k: v for (k, v) in sorted(x.items(), key=lambda item: item[1])}

def sum1(n):
	ans = 0
	for i in str(n):
		ans += int(i)
	return ans

def solve(n):
	ans = 19
	for i in range(n - 1):
		ans += 9
		while sum1(ans) != 10:
			ans += 9
	return ans
n = int(input())
print(solve(n))


def great(x):
	sum = 0
	while x > 0:
		sum += x % 10
		x //= 10
	return sum == 10
k = int(input())
(i, n) = (0, 0)
while n < k:
	i += 1
	n += great(i)
print(i)


import sys

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

def iinput():
	return int(input())

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

def get_list():
	return list(map(int, sys.stdin.readline().strip().split()))
n = iinput()
i = 10
while n:
	i += 9
	if sum(map(int, str(i))) == 10:
		n -= 1
print(i)


def E(x):
	r = 0
	while x != 0:
		r += x % 10
		x //= 10
	return r
k = int(input())
n = 0
while k != 0:
	n += 1
	if E(n) == 10:
		k -= 1
print(n)


n = int(input())
counter = 0
perfect = 1
while counter != n:
	perfect += 9
	if sum(map(int, str(perfect))) == 10:
		counter += 1
print(perfect)


n = int(input())
x = 1
i = 0
while i < n:
	x = x + 9
	y = x
	z = 0
	while y > 0:
		z = z + y % 10
		y = y // 10
	if z == 10:
		i += 1
print(x)


def sum1(n):
	sum = 0
	while n:
		sum = sum + n % 10
		n //= 10
	return sum
n = int(input())
sum2 = 0
while n:
	sum2 += 1
	if sum1(sum2) == 10:
		n = n - 1
print(sum2)


def check(x):
	res = 0
	t = x
	while t:
		res += t % 10
		t //= 10
	return int(res == 10)
k = int(input())
i = 0
while i <= 20000000:
	k -= check(i)
	if not k:
		print(i)
		break
	i += 1


import math as mt
import sys, string, bisect
input = sys.stdin.readline
import random
from collections import deque, defaultdict
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
I = lambda : int(input())
n = I()
l = [19, 28, 37, 46, 55, 64, 73, 82, 91]
i = 0
while len(l) < n:
	x = l[i]
	y = x // 10 * 100 + l[i] % 10
	while y <= x * 10:
		l.append(y)
		y += 9
		if len(l) > n:
			break
	i += 1
print(l[n - 1])


def Sum_Check(p):
	r = 0
	while p:
		r = r + p % 10
		p = p // 10
	return r
n = int(input())
perfectNum = 10
for i in range(n):
	while True:
		perfectNum += 9
		if Sum_Check(perfectNum) == 10:
			break
print(perfectNum)


import itertools

def f(v):
	s = 0
	while v != 0:
		s += v % 10
		v //= 10
	return s

def main():
	l = int(input())
	c = 0
	for i in range(0, 100000000):
		if f(i) == 10:
			c += 1
			if c == l:
				print(i)
				return
main()


def sum_digits(n):
	s = 0
	while n:
		s += n % 10
		n //= 10
	return s
x = 10
k = int(input())
j = 0
while 1:
	x += 9
	j += 1
	if not sum_digits(x) == 10:
		j -= 1
		continue
	elif j == k:
		print(x)
		break


k = int(input())

def sum_digits(n):
	s = 0
	while n:
		s += n % 10
		n //= 10
	return s

def perfectnumbers(n):
	count = 0
	h = 19
	while True:
		sum = 0
		x = h
		if sum_digits(x) == 10:
			count += 1
		if count == k:
			return h
		else:
			h += 9
print(perfectnumbers(k))


import sys

def is_perfect(number):
	sum_digits = 0
	while number:
		sum_digits += number % 10
		number //= 10
	return sum_digits == 10
to_find = int(sys.stdin.readline())
candidate = 10
while to_find:
	candidate += 9
	if is_perfect(candidate):
		to_find -= 1
print(candidate)


def beautiful(n):
	return True if sum(map(int, str(n))) == 10 else False
k = int(input())
cnt = 0
i = 19
while cnt < 10000:
	if beautiful(i):
		cnt += 1
		if cnt == k:
			print(i)
			break
	i += 9


def sum(x):
	ans = 0
	while x:
		ans += x % 10
		x //= 10
	return ans
k = int(input())
ans = [0]
a = 19
i = 0
while i < k:
	if sum(a) == 10:
		ans.append(a)
		i += 1
		a += 1
	else:
		a += 1
print(ans[k])


def calc(p):
	s = 0
	while p:
		s += p % 10
		p //= 10
	return s
n = int(input())
a = 19
while n > 1:
	a += 9
	if calc(a) == 10:
		n -= 1
print(a)


def f(x):
	res = 0
	while x > 0:
		res += x % 10
		x //= 10
	return res
k = int(input())
x = 1
while True:
	if f(x) == 10:
		k -= 1
		if k == 0:
			print(x)
			exit(0)
	x += 1