#include #include #include using namespace std; using ll=long long; #define all(v) v.begin(),v.end() #define rall(v) v.rbegin(),v.rend() template bool chmax(T &a, T b){if (a < b){a = b;return true;} else return false;} template bool chmin(T &a, T b){if (a > b){a = b;return true;} else return false;} int main(){ ios::sync_with_stdio(false); cin.tie(nullptr); int N; cin>>N; vector dp(N+1,vector(2,1<<30)); vector to(N+1,vector(2,-1)); dp[0][0]=0; for(int x=0;xdp[N][1])t=1; else t=0; string S=""; while(to[x][t]!=-1){ int a=to[x][t]; x-=a*a; if(a%2==0)t=1-t; for(int i=a-1;i>=0;i--){ if(i%2==t)S+='0'; else S+='1'; } } reverse(all(S)); cout<