#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  cin >> n;
  int sol[1002];
  int cnt = 0;
  while (n > 0) {
    sol[++cnt] = cnt;
    n -= cnt;
    if (n <= sol[cnt]) sol[cnt] += n, n = 0;
  }
  cout << cnt << '\n';
  for (int i = 1; i <= cnt; i++) cout << sol[i] << ' ';
  return 0;
}
