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.
A single line with a positive integer $k$ ($1 \leq k \leq 10\,000$).
The first perfect integer is $19$ and the second one is $28$.
1
19
2
28
13
136
101
1432
1023
100270
9999
10800010
10000
10800100
2333
310060
9139
10134010
9859
10422001
5987
2221201
3
37
4
46
5
55
7
73
9
91
10
109
15
154
51
613
99
1414
138
2224
233
5050
666
27100
1234
110206
3567
1033003
4445
1221301
5689
2114002
6666
3102004
7777
5300200
8888
10110061
9411
10214200
5539
2101114
6259
2511100
2387
312220
8515
10030114
x=int(input(""))
if x>9500:
    c=9500
    on=10232101
    while c!=x:
        u=0
        on+=1
        for i in str(on):
            u+=int(i)
        if u==10:
            c+=1
    print(on)
elif x>9000:
    c=9000
    on=10116100
    while c!=x:
        u=0
        on+=1
        for i in str(on):
            u+=int(i)
        if u==10:
            c+=1
    print(on)
elif x>8500:
    c=8500
    on=10025101
    while c!=x:
        u=0
        on+=1
        for i in str(on):
            u+=int(i)
        if u==10:
            c+=1
    print(on)
elif x>8000:
    c=8000
    on=9010000
    while c!=x:
        u=0
        on+=1
        for i in str(on):
            u+=int(i)
        if u==10:
            c+=1
    print(on)
elif x>7500:
    c=7500
    on=4301200
    while c!=x:
        u=0
        on+=1
        for i in str(on):
            u+=int(i)
        if u==10:
            c+=1
    print(on)
elif x>6000:
    c=6000
    on=2230003
    while c!=x:
        u=0
        on+=1
        for i in str(on):
            u+=int(i)
        if u==10:
            c+=1
    print(on)
elif x>4000:
    c=4000
    on=1120024
    while c!=x:
        u=0
        on+=1
        for i in str(on):
            u+=int(i)
        if u==10:
            c+=1
    print(on)
elif x>2000:
    c=2000
    on=220033
    while c!=x:
        u=0
        on+=1
        for i in str(on):
            u+=int(i)
        if u==10:
            c+=1
    print(on)
else:
    c=0
    on=0
    while c!=x:
        u=0
        on+=1
        for i in str(on):
            u+=int(i)
        if u==10:
            c+=1
    print(on)