#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  int x = 1, a = 0, b[1000];
  while (x + x + 1 <= n) {
    b[a++] = x;
    n -= x++;
  }
  b[a++] = n;
  cout << a << endl;
  for (int i = 0; i < a; i++) {
    cout << b[i] << " ";
  }
  return 0;
}
