#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long n;
  cin >> n;
  long long a = 1;
  list<long long> v;
  map<long long, long long> m;
  while (n > 0) {
    if (n >= a && m[a] == 0) {
      n -= a;
      v.push_back(a);
      m[a]++;
    } else
      break;
    a++;
  }
  long long x = v.back() + n;
  v.pop_back();
  v.push_back(x);
  cout << v.size() << endl;
  for (auto i : v) cout << i << " ";
  return 0;
}
