#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, s = 0;
  cin >> n;
  for (int i = 1;; i++) {
    s++;
    n = n - i;
    if (n < (i + 1)) {
      break;
    }
  }
  cout << s << endl;
  for (int i = 1; i < s; i++) {
    cout << i << " ";
  }
  cout << n + s;
  return 0;
}
