#include<bits/stdc++.h>
#define rep(i, n) for (int i=0; i<(n); i++)
#define ll long long
using namespace std;

int main() {
  int n;
  cin>>n;
  vector<bool> a(n, false);
  ll sum=0;
  rep(i, n) {
    sum+=(i+1);
    a[i]=true;
    if (sum>n) {
      a[sum-n-1]=false;
      break;
    }
    if (sum==n) break;
  }
  rep(i, n) if (a[i]) cout<<(i+1)<<endl;
}