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

int main() {
  ll N;
  cin >> N;
  ll sum = 0;
  ll j = 0;
  for (ll i = 1; i <= N; i++) {
    sum += i;
    if (sum >= N) {
      j = i;
      break;
    }
  }
  
  for (ll i = 1; i <= j; i++) {
    if (i == sum - N) continue;
    else cout << i << endl;
  }
}