s = int(input()) a = [] while s > 0: ai = max(1, (int(s**0.5) - 1)**2) a.append(ai) s -= ai print(len(a)) print(*a)