def digitsums(N):
    digsum = 0
    for i in range(len(str(N))):
        digsum = digsum + int(N % 10)
        N = N / 10
    return digsum
K = int(input())
pcount=0
for n in range(1,10**15):
    for m in range(n+1,10**15):
        if(n/digitsums(n)<=m/digitsums(m)):
            pcount = pcount+1
            print(n)
            break
    if(pcount>=K):
        break
