#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  vector<int> ans;
  int idx = 1;
  while (n >= idx) {
    ans.push_back(idx);
    n -= idx;
    idx++;
  }
  ans[ans.size() - 1] += n;
  n = 0;
  cout << ans.size() << endl;
  for (auto x : ans) cout << x << " ";
}
