#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, sum = 0, siz;
  cin >> n;
  vector<int> v;
  for (i = 1; i <= n; ++i) {
    sum += i;
    if (sum > n) {
      sum = sum - i;
      siz = v.size();
      if (siz >= 2)
        v[siz - 1] += n - sum;
      else
        v[siz - 1] = n;
      break;
    } else {
      v.push_back(i);
    }
  }
  cout << v.size() << "\n";
  siz = v.size();
  for (i = 0; i < siz; ++i) cout << v[i] << " ";
  cout << "\n";
  return 0;
}
