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.StringTokenizer;


public class A753_Candies {

	public static void main(String [] args) throws IOException{
		
		// Input
		BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer input = new StringTokenizer(in.readLine(), " ");

		int n = Integer.parseInt(input.nextToken());
		int [] sums = new int[45];
		sums[0]=1;
		for (int i = 1; i < sums.length; i++) {
			sums[i]=sums[i-1]+i+1;
		}
		
		int k = binSearch(44,0,n,sums);
		int spare = n-sums[k];
		System.out.println((k+1));
		for (int i = 0; i < k; i++) {
			System.out.print(i+1+" ");
		}
		System.out.print(k+1+spare);
		
	}
	
	public static int binSearch(int hi, int lo, int S, int [] data){
		int mid = (hi+lo)/2;
		if(data[mid]>S){
			return binSearch(mid,lo,S,data);
		}
		if(data[mid+1]>S){return mid;}
		return binSearch(hi,mid,S,data);
	}
	
	public static int log2floor(int n){
	    if(n <= 0) throw new IllegalArgumentException();
	    return 31 - Integer.numberOfLeadingZeros(n);
	}
	
	public static int log2ceil(int n){
		if(n <= 0) throw new IllegalArgumentException();
	    return 32 - Integer.numberOfLeadingZeros(n-1);
	}
	
	static class Pair implements Comparable<Pair>{
		long a;
		long b;
		
		public Pair(long q, long w){
			a=q;
			b=w;
		}

		@Override
		public int compareTo(Pair o) {
			return Long.compare(this.a, o.a);
		}
		
		public static Pair add(Pair a, Pair b){
			return new Pair(a.a+b.a,a.b+b.b);
		}
		
		public static Pair sub(Pair a, Pair b){
			return new Pair(a.a-b.a,a.b-b.b);
		}
		public static Pair neg(Pair a){
			return new Pair(-a.a,-a.b);
		}

	}
	
}
