n = int(input()) ans = [[i,j] for i in range(1,9) for j in range(2,10) if i < j] syou = n//36 amari = n%36 a=0 for i in range(syou+1): a = a*10+1 print(10**(syou+1)*ans[amari-1][0] + a*ans[amari-1][1])