#include <bits/stdc++.h>
using namespace std;
int main(){
  int N;
  cin >> N;
  vector<int> ans;
  int sum = 0;
  int next = 1;
  while (1){
    sum += next;
    ans.push_back(next);
    if (sum >= N){
      break;
    }
    next++;
  }
  int x = sum - N;
  int K = ans.size();
  for (int i = 0; i < K; i++){
    if (ans[i] != x){
      cout << ans[i] << endl;
    }
  }
}