k = int(input())
i = 0
n = 1
while True:
    if n == k:
        break
    sn = 0
    sm = 0
    m = n+1
    for a in list(str(n)):
        sn += int(a)
    for b in list(str(m)):
        sm += int(b)
    left = n/sn
    
    if left <= m/sm and m(sm+1) > sm(m+1):
        print(n)
    
    n += 1

