#include <bits/stdc++.h>
using namespace std;

typedef long long ll;


int main () {


    ll N;
    cin >> N;

    ll i,sum = 0;
    for( i=1; i<=N; i++) {
	sum += i;
	if( sum >= N ) {
	    break;
	}
    }
   sum = N;
    for(; i>0; i--) {
	if( sum - i < 0 ) continue;
	cout << i << endl;
	sum -= i;
    }
    

    
    return 0;
}
