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