#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t, n;
  t = 1;
  while (t--) {
    cin >> n;
    long long int i = 1;
    vector<long long int> v;
    while (n >= i) {
      n -= i;
      v.push_back(i);
      i++;
    }
    long long int q = v[v.size() - 1];
    q += n;
    v[v.size() - 1] = q;
    long long int p = v.size();
    cout << p << ("\n");
    for (int i = 0; i < p; i++) cout << v[i] << " ";
    cout << ("\n");
  }
  return 0;
}
