def magic(x):
result = []
c = 1
while x > 0:
if x - c >= c + 1:
result.append(c)
x -= c
c += 1
else:
result.append(x)
break
return result
x=int(input())
a = magic(x)
print(len(a))
print(" ".join(map(str,a)))