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