#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int x = 1;
  while ((x * (x + 1)) / 2 <= n) ++x;
  cout << x - 1 << endl;
  for (int i = 0; i < x - 2; ++i) cout << i + 1 << ' ';
  cout << n - ((x - 2) * (x - 1)) / 2 << endl;
}
