#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int i = 1, j, k;
  vector<int> v;
  while (1) {
    if ((i * (i + 1)) / 2 > n) break;
    i++;
  }
  i = i - 1;
  cout << i << "\n";
  for (j = 1; j <= i - 1; j++) {
    cout << j << " ";
  }
  j--;
  k = (j * (j + 1)) / 2;
  cout << n - k << "\n";
  return 0;
}
