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