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