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