S = int(input()) ans = [] while S > 0: a = round(S**0.5) ** 2 ans.append(a) S -= a print(len(ans)) print(*ans)