
# coding: utf-8

# In[18]:


import sys
def max_prizes (a):
    if a==1:
        return [1]
    if a==2:
        return [2]
    if a>2:
        x=[]
        for i in range(1,a):
            if (a-i)>i:
                #print(i)
                x.append(i)
                #print(x)
                a=a-i
            else:
                x.append(a)
                break
                #print(x)
        return x
    
if __name__ == '__main__':
    input = sys.stdin.read()
    n = int(input)
    summands = max_prizes(n)
    print(len(summands))
    for x in summands:
        print(x, end=' ')         
            
        


# In[17]:


max_prizes(6)


08c7e71d96a6734906c4353950a8d868e0b6a0b3
<mask token>

<mask token>


def max_prizes(a):
    if a == 1:
        return [1]
    if a == 2:
        return [2]
    if a > 2:
        x = []
        for i in range(1, a):
            if a - i > i:
                x.append(i)
                a = a - i
            else:
                x.append(a)
                break
        return x


<mask token>

<mask token>


def max_prizes(a):
    if a == 1:
        return [1]
    if a == 2:
        return [2]
    if a > 2:
        x = []
        for i in range(1, a):
            if a - i > i:
                x.append(i)
                a = a - i
            else:
                x.append(a)
                break
        return x


if __name__ == '__main__':
    input = sys.stdin.read()
    n = int(input)
    summands = max_prizes(n)
    print(len(summands))
    for x in summands:
        print(x, end=' ')
max_prizes(6)

import sys


def max_prizes(a):
    if a == 1:
        return [1]
    if a == 2:
        return [2]
    if a > 2:
        x = []
        for i in range(1, a):
            if a - i > i:
                x.append(i)
                a = a - i
            else:
                x.append(a)
                break
        return x


if __name__ == '__main__':
    input = sys.stdin.read()
    n = int(input)
    summands = max_prizes(n)
    print(len(summands))
    for x in summands:
        print(x, end=' ')
max_prizes(6)


# coding: utf-8

# In[18]:


import sys
def max_prizes (a):
    if a==1:
        return [1]
    if a==2:
        return [2]
    if a>2:
        x=[]
        for i in range(1,a):
            if (a-i)>i:
                #print(i)
                x.append(i)
                #print(x)
                a=a-i
            else:
                x.append(a)
                break
                #print(x)
        return x
    
if __name__ == '__main__':
    input = sys.stdin.read()
    n = int(input)
    summands = max_prizes(n)
    print(len(summands))
    for x in summands:
        print(x, end=' ')         
            
        


# In[17]:


max_prizes(6)

