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