#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, i;
  cin >> n;
  int t = (-1 + sqrt(8 * n + 1)) / 2;
  cout << t << endl;
  int l = t * (t - 1) / 2;
  for (i = 1; i < t; i++) cout << i << " ";
  cout << n - l << endl;
}
