dp = [[0 for _ in range(30+1)] for _ in range(30+1)] for n in range(30+1): dp[n][0] = 1 for n in range(1,30+1): for k in range(1,n+1): dp[n][k] = dp[n-1][k-1]+dp[n-1][k] K = int(input()) if K==0: print(1) print(1) elif K==1: print(2) print(1,1) else: ans = 0 for N in range(2,30+1): for N1 in range(2,N+1): cnt = 0 for k in range(2,N-N1+3): cnt += dp[N1][2]*dp[N-N1][k-2] if cnt==K: ans = (N,N1) break if ans!=0:break if ans!=0:break n = ans[0] n1 = ans[1] b = [0]*n for i in range(n1): b[i] = 1 print(n) print(*b)