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 sun.font.FontRunIterator;

import java.awt.*;
import java.io.*;
import java.util.*;

public class Main {

    private static BufferedReader br;
    private static StringTokenizer st;
    private static PrintWriter out;
    public static void main(String[] args) throws IOException {
        smart_init("rec.in", "rec.out");
        int n = nextInt();
        int sum = 0;
        int promej = 0;
        int y = 1;
        while (sum < n){
            sum += y;
            promej = y;
            y++;
        }
        if (sum > n){
            sum -= promej--;
        }
        out.println(promej);
        for (int i = 1; i < promej; i++) {
            out.print((i)+" ");
        }
        if (sum != n){
            out.print(n - (sum - promej));
        }else{
            out.print(promej);
        }
        out.close();
    }

    private static long nextLong() throws IOException {
        return Long.parseLong(next());
    }

    private static int nextInt() throws IOException {
        return Integer.parseInt(next());
    }

    private static String next() throws IOException {
        if (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(br.readLine());
        }
        return st.nextToken();
    }
    private static void smart_init(String s, String s1) throws IOException{
        try {
            file_init(s , s1);
        }catch (Exception e){
            io_init();
        }
    }
    private static void io_init() throws IOException{
        br = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(System.out);
    }
    private static void file_init(String s, String s1) throws IOException{
        br = new BufferedReader(new FileReader(s));
        out = new PrintWriter(s1);
    }
}
class Zapros implements Comparator<Zapros>{
    int zap, id;
    public Zapros(){
    }
    public Zapros(int zap, int poz){
        this.zap = zap;
        this.id = poz;
    }
    @Override
    public int compare(Zapros o1 , Zapros o2){
        return Integer.compare(o1.zap , o2.zap);
    }
}
