s=int(input()) a=[] while s>0: ok=0 ng=s+1 while ng-ok>1: m=(ok+ng)//2 if m**2<=s: ok=m else: ng=m a+=[ok**2] s-=ok**2 print(len(a)) print(*a)