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

import javax.swing.plaf.synth.SynthSpinnerUI;

public class Main {
	static List<List<Integer>> list;
	static List<Integer> component;
	static boolean[] visited;
	public static void main(String[] args) {
		FastReader scanner = new FastReader();
		int n = scanner.nextInt();
		int number = 1;
		int total = 1;
		while(total + number + 1 <= n) {
			total += number + 1;
			number++;
		}
		System.out.println(number);
		for(int i = 1; i < number; i++) System.out.print(i + " ");
		System.out.println(n - total + number);
	}
	
	
	static void dfs(int v) {
		component.add(v);
		visited[v] = true;
		for(int next : list.get(v)) {
			if(!visited[next]) dfs(next);
		}
	}
}





class UF {
	int[] a;
	int[] weight;
	int count = 0;
	public UF(int n) {
		a = new int[n];
		for(int i = 0; i < n; i++) a[i] = i;
		weight = new int[n];
		Arrays.fill(weight, 1);
	}
	long getCount() {
		double total = 0;
		for(int i = 0; i < a.length; i++) {
			total += (weight[i]-1)/weight[i];
		}
		return (long) Math.pow(2, count);	
	}
	void print() {
		System.out.println(Arrays.toString(a));
		System.out.println(Arrays.toString(weight));
	}
	
	public void union(int i, int j) {
		int rootFirst = root(i);
		int rootSecond = root(j);
		if(rootFirst != rootSecond) {
			count++;
			if(weight[rootFirst] < weight[rootSecond]) {
				a[rootFirst] = rootSecond;
				weight[rootSecond] += weight[rootFirst];
			} else {
				a[rootSecond] = rootFirst;
				weight[rootFirst] += weight[rootSecond];
			}
		}
	}
	
	private int root(int i) {
		if(a[i] == i) return i;
		a[i] = root(a[i]);
		return a[i];
	}
	
	
}


class FastReader
{
    BufferedReader br;
    StringTokenizer st;

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

    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 str = "";
        try
        {
            str = br.readLine();
        }
        catch (IOException e)
        {
            e.printStackTrace();
        }
        return str;
    }
}
class Pair2 implements Comparable<Pair2>{
	int x, y;
	public Pair2(int x, int y) {this.x = x; this.y = y;}
	@Override
	public int compareTo(Pair2 o) {
		if(this.x < o.x) return -1;
		if(this.x > o.x) return 1;
		return 0;
	}	

}
