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