#include <bits/stdc++.h>
using namespace std;
int n, k, cur, o1, o2;
vector<int> v;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (k = 1; k * (k + 1) / 2 <= n; k++) v.push_back(k);
  k--;
  cur = k * (k + 1) / 2;
  cur = n - cur;
  o1 = cur / v.size();
  o2 = cur % v.size();
  for (int i = 0; i < v.size(); i++) v[i] += o1;
  v[v.size() - 1] += o2;
  cout << v.size() << '\n';
  for (int i = 0; i < v.size(); i++) cout << v[i] << ' ';
}
