#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ios::sync_with_stdio(false), cin.tie(nullptr);
  int n, i;
  cin >> n;
  for (i = 1; (i * (i + 1)) / 2 <= n; ++i)
    ;
  cout << --i << "\n";
  for (int j = 1; j < i; ++j) cout << j << " ";
  cout << n - (i * (i - 1) / 2) << "\n";
  return 0;
}
