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

int main() {
  int n;
  cin >> n;

  vector<int> v;
  int sum = 0;
  for (int i = 1; i <= n; ++i) {
    sum += i;
    v.push_back(i);

    if (sum >= n) {
      int x = sum - n;
      for (int i = 0; i < v.size(); ++i)
        if (v[i] != x)
          cout << v[i] << endl;
      return 0;
    }
  }
}