//* Problem  : 2226 - Parliament
//* Contest  : acm.tju.edu.cn
//* Type     : Solution
//* Date     : 2007.08.08
//* Author   : alt
//* Language : C++
//* Compiler : Microsoft Visual C++ 6.0

#include <stdio.h>
#include <math.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>

int n;
int a[1000];

int get_k()
{
	int k = 1;
	while (n >= ((k+1)*(k+2)/2 - 1)) k++;
	return k;
}

void solve()
{
	int k = get_k(), d, i;
	d = n - (k * (k + 1) / 2 - 1);
	for (i = 2; i <= k; i++)
		a[i-2] = i;
	while (d)
		for (i = k - 2; i >= 0; i--)
			if (d) {a[i]++; d--;}
	for (i = 0; i < k - 2; i++)
		printf("%d ", a[i]);
	printf("%d\n", a[k-2]);


}

int main()
{
	scanf("%d", &n);
	solve();
}