from scipy.special import comb import sys K = int(input()) if K == 0: print(0) sys.exit() for i in range(2,31): two_ch = comb(i,2,exact=True) for j in range(31-i): ans = 0 for k in range(j+1): one_ch = comb(j,k,exact=True) ans += two_ch * one_ch if ans == K: print(i + j) print("1 "*i + "0 "* j ) sys.exit()