#include <bits/stdc++.h>
using namespace std;
const int MX = 100005, infi = 1000000, mod = 998244353;
const double EPS = 1E-9;
int n, sol;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  for (int i = 1; i <= 1000; i++) {
    if (i * (i + 1) / 2 <= n) sol = i;
  }
  cout << sol << "\n";
  for (int i = 1; i <= sol; i++) {
    if (i < sol)
      cout << i << " ", n -= i;
    else
      cout << n;
  }
  return 0;
}
