#include #include using ll = long long ; using namespace std; int main(){ ll K,count=0,zero,one; cin >> K; while(K%2==0){ K/=2; if(count==0) count++; else count*=2; } zero = log2(count); one = sqrt(K*4)+1; cout << zero+one << endl; while(zero--) cout << '0'; while(one--) cout << '1'; cout << endl; return 0; }