#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n, i = 1;
  cin >> n;
  vector<long long int> a;
  while (i <= n) {
    a.push_back(i);
    n -= i;
    i++;
  }
  cout << a.size();
  cout << endl;
  ;
  a[a.size() - 1] += n;
  for (auto i : a) cout << i << " ";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int q = 1;
  while (q--) {
    solve();
    cout << endl;
    ;
  }
}
