n=int(input()) ans=[0]*(n+1) m=n;p=9 while m>1: while m*2+1>n or ans[m*2+1]>p: ans[m]=p;m-=1 p-=1 print("".join(map(str,ans[1:])))