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.io.*;
import java.util.*;
import java.lang.*;

public final class Main {
    //2^1 2^2 2^3 2^4 2^5 2^6 3^1 3^2 3^3 3^4 5^1 5^2 7^1 7^2
    private void solve() {
        int n=in.nextInt();
        int k=(int)(Math.sqrt(n*2 +0.25)-0.5);
        out.println(k);
        int[] a = new int[k];
        for (int i=0; i<k;i++){
            a[i]+=i+1;
            n-=a[i];
        }
        while (n>0){
            int tmp=n/k;
            if (tmp==0)
                tmp=1;
            for (int i=k-1;i>=0 && n-tmp>=0;i--){
                a[i]+=tmp;
                n-=tmp;
            }
        }
        for (int i=0; i<k;i++){
            out.print(a[i]+" ");
        }
    }

    //    -------------I/O-------------    \\

    void run() {
        try {
            in = new FScanner(new File("input.txt"));
            out = new PrintWriter(new BufferedWriter(new FileWriter(new File("output.txt"))));
            solve();
            out.close();
            in.close();
        } catch (IOException ex) {
            ex.printStackTrace();
        }
    }

    void runIO() {
        in = new FScanner();
        out = new PrintWriter(new BufferedOutputStream(System.out));
        solve();
        out.close();
        in.close();
    }

    public static void main(String[] args) {
        new Main().runIO();
    }

    private FScanner in;
    private PrintWriter out;

    class FScanner {

        private BufferedReader br;
        private StringTokenizer st;

        public FScanner() {
            br = new BufferedReader(new InputStreamReader(System.in));
        }

        public FScanner(File f) {
            try {
                br = new BufferedReader(new FileReader(f));
            } catch (FileNotFoundException ex) {
                ex.printStackTrace();
            }
        }

        void useString(String s) {
            if (s != null) {
                st = new StringTokenizer(s);
            }
        }

        String next() {
            while (st == null || !st.hasMoreElements()) {
                try {
                    st = new StringTokenizer(br.readLine());
                } catch (IOException e) {
                    e.printStackTrace();
                }
            }
            return st.nextToken();
        }

        int nextInt() {
            return Integer.parseInt(next());
        }

        long nextLong() {
            return Long.parseLong(next());
        }

        double nextDouble() {
            return Double.parseDouble(next());
        }

        String nextLine() {
            String s = "";
            try {
                s = br.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return s;
        }

        void close() {
            try {
                br.close();
            } catch (IOException ex) {
                ex.printStackTrace();
            }
        }

    }

    class LinkedList {
        char c;
        LinkedList next;
        LinkedList prev;

        LinkedList(char i) {
            c = i;
            next = this;
            prev = this;
        }

        public char getC() {
            return c;
        }


        public void setNext(LinkedList next) {
            this.next = next;
        }

        public void setPrev(LinkedList prev) {
            this.prev = prev;
        }

        public LinkedList getNext() {
            return next;
        }

        public LinkedList getPrev() {
            return prev;
        }

        public LinkedList add(LinkedList i) {
            i.setNext(this.next);
            this.next = i;
            i.getNext().setPrev(i);
            i.setPrev(this);
            return this.next;
        }

        public LinkedList delete() {
            this.next.setPrev(this.prev);
            this.prev.setNext(this.next);
            return this.next;
        }
    }

}
