#include typedef long long ll; using namespace std; int INF = 1LL << 30; int MOD = 1e9+7; main(){ int K; cin >> K; if(K == 0){ cout << 1 << endl << 0 << endl; return 0; } int N,zero; for(int i = 1,sum = 0;sum <= K;i++){ sum += i; int num = K / sum; if(K % sum == 0 && (num & -num) == num){ zero = log2(num); N = log2(num) + i + 1; break; } } cout << N << endl; for(int i = 0;i < N;i++){ if(zero){ cout << 0 << endl; zero--; }else{ cout << 1 << endl; } } }