i,n,k;main(j){for(scanf("%d",&n);j%3|k%2||--n;k=++i)for(j=25;k&=k-1;j++);for(i--;j;)--j<31&(k=i>>j)&&putchar(51+k%2*2);}