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