#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n;
  cin >> n;
  vector<int> ans;
  int n0 = n;
  for (int i = 1; i <= n0; ++i) {
    if (n - i >= 0) {
      ans.push_back(i);
      n -= i;
    } else {
      ans[ans.size() - 1] += n;
      break;
    }
  }
  cout << ans.size() << '\n';
  for (auto i : ans) cout << i << ' ';
}
