def Floor_Root(a,k): """floor(a^(1/k)) を求める. a:非負整数 k:正の整数 """ assert 0<=a and 0a: x-=1 return x def solve(): S = int(input()) A = [] while S: x = Floor_Root(S, 2) A.append(x * x) S -= x * x print(len(A)) print(*A) #================================================== solve()