from math import factorial K = int(input()) for i in range(2, 31): for j in range(i, 31): if factorial(i)//2//factorial(i-2) * 2**j == K: print(i+j) print(" ".join(["1"]*i+["0"]*j)) exit() else: print(1) print(0)