#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  std::vector<int> v;
  long long val;
  long long prev = 0;
  for (int i = 1; i <= 1000; i++) {
    val = i + prev;
    v.push_back(val);
    prev = val;
  }
  std::vector<int>::iterator pos;
  pos = upper_bound(v.begin(), v.end(), n);
  int times = pos - v.begin();
  long long count = 0;
  cout << times << endl;
  for (int i = 0; i < times - 1; i++) {
    cout << i + 1 << " ";
    count += i + 1;
  }
  cout << n - count;
}
