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