#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n;
  cin >> n;
  int a = 0;
  for (int i = 1; i * (i + 1) / 2 <= n; ++i) {
    a = i;
  }
  cout << a << endl;
  for (int i = 1; i < a; ++i) {
    if (i == 1) {
      cout << i;
    } else {
      cout << " " << i;
    }
  }
  cout << " " << n - a * (a - 1) / 2;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int t = 1;
  for (int i = 0; i < t; ++i) {
    solve();
  }
}
