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

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