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