#include <stdio.h>
#include <math.h>
using namespace std;

int n;

int main()
{
	scanf("%d", &n);
	int d = (int)ceil(sqrt(8 * n + 1)) / 2;
	printf("%d\n", d);
	for (int i = 1; i <= d; i++)
	{
		printf("%d ", i);
	}
	return 0;
}