import std.algorithm; import std.array; import std.conv; import std.math; import std.range; import std.stdio; import std.string; import std.typecons; T read(T)() { return readln.chomp.to!T; } T[] reads(T)() { return readln.split.to!(T[]); } alias readint = read!int; alias readints = reads!int; long nck(int n, int k) { if (k == 0) return 1; if (n == 0) return 0; return nck(n - 1, k - 1) * n / k; } void calc(int k) { for (int i = 2; i <= 30; i++) { for (int j = 0; j <= 30; j++) { if (i + j > 30) break; long a = nck(i, 2); long b = 2 ^^ j; if (a * b == k) { auto ans = chain(replicate([1], i), replicate([0], j)); writeln(ans.count); writeln(ans.map!(e => e.to!string).join(" ")); return; } } } // not found writeln(1); writeln(0); } void main() { int k = readint; calc(k); }