#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> v;
  int n;
  cin >> n;
  for (int i = 1;; i++) {
    if (n - i <= i) {
      v.push_back(n);
      break;
    }
    n -= i;
    v.push_back(i);
  }
  cout << v.size() << endl;
  for (auto x : v) {
    cout << x << " ";
  }
}
