from math import factorial c = lambda y, x: factorial(y) // factorial(x) // factorial(y - x) def solve(): k = int(input()) if k <= 250: return [1] + [4] * (k - 1) for i in range(2, 251): for j in range(2, 251 - i): if i * j + c(i, 2) == k: return [1] * i + [4] * j if c(i, 2) == k: return [2] * i + [3] * j return [0] v = solve() print(len(v)) print(*v)