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