n,f,m=26;main(i){for(scanf("%d",&n);n-=++i&1&&__builtin_popcount(i)%3==1;);for(;m--;)write(1,"35"+(n=i>>m&1),f|=n);}