#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  long long n, i = 1;
  cin >> n;
  vector<long long> r;
  while (n) {
    if ((n - i) <= i) {
      r.push_back(n);
      break;
    } else
      n -= i, r.push_back(i);
    i++;
  }
  cout << int(r.size()) << "\n";
  for (long long i : r) cout << i << " ";
  cout << "\n";
  return 0;
}
