#include <iostream>
using namespace std;
int N;
int main() {
	cin >> N;
	int a = -1, b = -1;
	for (int i = 2; i <= 30; i++) {
		for (int j = 0; i + j <= 30; j++) {
			if (i * (i - 1) * (1 << j) / 2 == N) {
				a = i, b = j;
			}
		}
	}
	cout << a + b << endl;
	for (int i = 0; i < a; i++) cout << 1 << ' ';
	for (int i = 0; i < b; i++) cout << 0 << ' ';
	return 0;
}