#include <bits/stdc++.h>
using namespace std;
int j = 1;
void count(vector<int> &v, int n) {
  if (n < (j)) {
    v[v.size() - 1] = v[v.size() - 1] + n;
    return;
  }
  v.push_back(j);
  n = n - j;
  j++;
  count(v, n);
}
int main() {
  int n;
  cin >> n;
  vector<int> v;
  count(v, n);
  cout << v.size() << endl;
  for (int i = 0; i < v.size(); i++) {
    cout << v[i] << " ";
  }
  cout << endl;
  return 0;
}
