#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  vector<int> ans;
  for (int i = 1; i <= n; ++i) {
    n -= i;
    ans.push_back(i);
  }
  bool ok = 1;
  for (int i : ans) {
    if (i == n) {
      ok = 0;
      break;
    }
  }
  if (ok) {
    cout << (n ? ans.size() + 1 : ans.size()) << "\n";
    for (int i : ans) cout << i << " ";
    if (n) cout << n;
  } else {
    cout << ans.size() << "\n";
    ans.back() += n;
    for (int i : ans) cout << i << " ";
  }
}
