#include <bits/stdc++.h>
using namespace std;
int main() {
  int c = 0;
  int n;
  cin >> n;
  int x = sqrt(1 + 8 * n);
  int y;
  y = x - 1;
  y = y / 2;
  cout << y << "\n";
  for (int i = 1; i < y; ++i) {
    cout << i << " ";
    c += i;
  }
  cout << n - c;
  return 0;
}
