#include <bits/stdc++.h>
using namespace std;
set<long long int> s[1001];
void solve() {
  long long int n;
  cin >> n;
  vector<long long int> x;
  long long int k = 1;
  while (n >= k) {
    x.push_back(k);
    n -= k;
    k++;
  }
  x.back() += n;
  cout << x.size() << endl;
  for (long long int i : x) cout << i << ' ';
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t = 1;
  while (t--) solve();
  return 0;
}
