ll n,i=1;{rd(n);for(;n-=__builtin_popcount(i+=2)%3==1;);rep(j,31)(n=i>>30-j)>1&&putchar(51+n%2*2);}