from math import sqrt, floor x = int(input()) best = floor((-1 + sqrt(1+(8*x)))/2) x -= best*(best-1)/2 l = list(range(1, best)) if x != 0: l.append(int(x)) print(len(l)) print(" ".join(map(str, l)))