Santa Claus has n candies, he dreams to give them as gifts to children.

What is the maximal number of children for whose he can give candies if Santa Claus want each kid should get distinct positive integer number of candies. Santa Class wants to give all n candies he has.

Input

The only line contains positive integer number n (1 ≤ n ≤ 1000) — number of candies Santa Claus has.

Output

Print to the first line integer number k — maximal number of kids which can get candies.

Print to the second line k distinct integer numbers: number of candies for each of k kid. The sum of k printed numbers should be exactly n.

If there are many solutions, print any of them.

Examples

Input

5


Output

2
2 3


Input

9


Output

3
3 5 1


Input

2


Output

1
2 
import java.util.*;
import java.io.*;
public class army
{
 
    
    /********* SOLUTION STARTS HERE ************/
 

    private static void solve(FastScanner s1, PrintWriter out){
        int n = s1.nextInt();
        int i = 1;
        int k = 0;
        Stack<Integer> s = new Stack<Integer>();
        while (true) {
            if (n-i>0){
                s.push(i);
                n = n-i;
                ++k;
                ++i;
                
            } else if (n - i == 0){
                s.push(i);
                ++k;
                break;
            } else {   
                int a = s.pop();
                /*System.out.println(a);
                System.out.println(n);*/
                int b = a +n;
                /*System.out.println(b);*/
                s.push(b);
                break;
            }
        }
        System.out.println(k);
        while(!(s.isEmpty())){
            System.out.print(s.pop() + " ");
        }
    }  
 
    
    /************* SOLUTION ENDS HERE **********/
    
    
    
    
    
    /********** TEMPLATE STARTS HERE ***********/
 
    public static void main(String []args) throws IOException {
    FastScanner in  = new FastScanner(System.in);
    PrintWriter out = 
        new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)), false); 
    solve(in, out);
    in.close();
    out.close();
    }    
 
    static class FastScanner{
    BufferedReader reader;
    StringTokenizer st;
    FastScanner(InputStream stream){reader=new BufferedReader(new InputStreamReader(stream));st=null;}  
    String next()
        {while(st == null || !st.hasMoreTokens()){try{String line = reader.readLine();if(line == null){return null;}            
         st = new StringTokenizer(line);}catch (Exception e){throw new RuntimeException();}}return st.nextToken();}
    String nextLine()  {String s=null;try{s=reader.readLine();}catch(IOException e){e.printStackTrace();}return s;}             
    int    nextInt()   {return Integer.parseInt(next());}
    long   nextLong()  {return Long.parseLong(next());}     
    double nextDouble(){return Double.parseDouble(next());}
    char   nextChar()  {return next().charAt(0);}
    int[]  nextIntArray(int n)         {int[] arr= new int[n];   int i=0;while(i<n){arr[i++]=nextInt();}  return arr;}
    long[] nextLongArray(int n)        {long[]arr= new long[n];  int i=0;while(i<n){arr[i++]=nextLong();} return arr;}  
    int[]  nextIntArrayOneBased(int n) {int[] arr= new int[n+1]; int i=1;while(i<=n){arr[i++]=nextInt();} return arr;}          
    long[] nextLongArrayOneBased(int n){long[]arr= new long[n+1];int i=1;while(i<=n){arr[i++]=nextLong();}return arr;}          
    void   close(){try{reader.close();}catch(IOException e){e.printStackTrace();}}              
    }
 
    /*********** TEMPLATE ENDS HERE *************/
}