# B - Exactly N points

n=int(eval(input()))



if n==1:

    print((1))

    exit()

t=0

acc=[]

for i in range(1,n+1):

    t+=i

    acc.append(t)

max_v=-1

for i in range(len(acc)-1):

    if acc[i]<n<=acc[i+1]:

        max_v=i+2

        break

ans=[]

ans.append(max_v)

cur=max_v

vv=acc[i+1]

vv-=cur

s=max_v



while vv and s<n:

    cur-=1

    if vv>cur and s+cur<=n:

        vv-=cur

        ans.append(cur)

        s+=cur

    elif vv<cur:

        continue

    elif vv==cur:

        vv-=cur

        ans.append(cur)

        s+=cur

for a in ans:

    print(a)

n=int(eval(input()))

c=0

for i in range(1,n+1):

  if i*(i+1)//2>=n:

    c=i

    break

for i in range(c,0,-1):

  if i<=n:

    print(i)

    n-=i
# B - Exactly N points
n = int(eval(input()))
if n == 1:
    print((1))
    exit()
t = 0
acc = []
for i in range(1, n + 1):
    t += i
    acc.append(t)
max_v = -1
for i in range(len(acc) - 1):
    if acc[i] < n <= acc[i + 1]:
        max_v = i + 2
        break
ans = []
ans.append(max_v)
cur = max_v
vv = acc[i + 1]
vv -= cur
s = max_v
while vv and s < n:
    cur -= 1
    if vv > cur and s + cur <= n:
        vv -= cur
        ans.append(cur)
        s += cur
    elif vv < cur:
        continue
    elif vv == cur:
        vv -= cur
        ans.append(cur)
        s += cur
for a in ans:
    print(a)

n = int(eval(input()))
c = 0
for i in range(1, n + 1):
    if i * (i + 1) // 2 >= n:
        c = i
        break
for i in range(c, 0, -1):
    if i <= n:
        print(i)
        n -= i

-# B - Exactly N points -if n == 1: -    print((1)) -    exit() -t = 0 -acc = [] +c = 0 -    t += i -    acc.append(t) -max_v = -1 -for i in range(len(acc) - 1): -    if acc[i] < n <= acc[i + 1]: -        max_v = i + 2 +    if i * (i + 1) // 2 >= n: +        c = i -ans = [] -ans.append(max_v) -cur = max_v -vv = acc[i + 1] -vv -= cur -s = max_v -while vv and s < n: -    cur -= 1 -    if vv > cur and s + cur <= n: -        vv -= cur -        ans.append(cur) -        s += cur -    elif vv < cur: -        continue -    elif vv == cur: -        vv -= cur -        ans.append(cur) -        s += cur -for a in ans: -    print(a) +for i in range(c, 0, -1): +    if i <= n: +        print(i) +        n -= i