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.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;

/*
    1/24/2019
    8:51 PM
*/
public class P00753A_SantaClausandCandies {
    public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);
        new P00753A_SantaClausandCandies().solve(in, out);
        out.close();
    }

    public void solve(InputReader in, PrintWriter out) {
        int n = in.nextInt();
        List<Integer> list = new ArrayList();

        int sum = 0;
        for (int i = 1; i <= n; i++) {
            sum = sum + i;
            if (sum > n) {
                list.set(list.size() - 1, list.get(list.size() - 1) + i - (sum - n));
                break;
            }
            list.add(i);
            if (sum == n) {
                break;
            }
        }

        out.println(list.size());
        for (int i : list) {
            out.print(i + " ");
        }
    }

    static class InputReader {
        private BufferedReader reader;
        private StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

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

        public String nextLine() {
            try {
                return reader.readLine();
            } catch (IOException e) {
                e.printStackTrace();
            }
            return null;
        }
    }
}