k = input()
num = 1
ans = 0
while ans < int(k):
    if (num/sum(list(map(int,str(num))))) > ((num+1)/sum(list(map(int,str(num+1))))):
        pass
        num += 1
    elif (num/sum(list(map(int,str(num))))) > ((num+2)/sum(list(map(int,str(num+2))))):
        pass
        num += 1
    elif (num/sum(list(map(int,str(num))))) > ((num+3)/sum(list(map(int,str(num+3))))):
        pass
        num += 1
    elif (num/sum(list(map(int,str(num))))) > ((num+5)/sum(list(map(int,str(num+5))))):
        pass
        num += 1
    elif (num/sum(list(map(int,str(num))))) > ((num+8)/sum(list(map(int,str(num+8))))):
        pass
        num += 1
    elif (num/sum(list(map(int,str(num))))) > ((num+9)/sum(list(map(int,str(num+9))))):
        pass
        num += 1
    else:
        print(num)
        num += 1
        ans += 1
