#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
const int mxN = 1001;
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  ;
  long long n;
  cin >> n;
  vector<long long> ans;
  long long x = 1;
  while ((x * (x + 1)) / 2 <= n) {
    ans.push_back(x);
    x++;
  }
  x--;
  long long rem = n - ((x * (x + 1)) / 2);
  cout << ans.size() << '\n';
  ans[ans.size() - 1] += rem;
  for (long long i : ans) cout << i << ' ';
}
