ss = int(input()) s = ss ans = [] import math while s >= 1: x = math.floor(math.sqrt(s)) ans.append(x**2) s -= x**2 while sum(ans) != ss: ans.append(1) print(len(ans)) print(*ans)