#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  int sum = 0;
  int k;
  int x;
  int z = 0;
  cin >> n;
  for (int i = 1; i < 100000; i++) {
    sum = sum + i;
    if (sum > n) {
      x = i - 1;
      break;
    }
  }
  cout << x << endl;
  for (int i = 1; i <= x - 1; i++) {
    cout << i << endl;
    z = z + i;
  }
  k = n - z;
  cout << k << endl;
}
