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