#include <bits/stdc++.h>
using namespace std;
int n;
int sum;
inline void solve() {
  cin >> n;
  int i = 1;
  while (sum + i <= n) {
    sum += i;
    i++;
  }
  if (sum == n) {
    cout << max(i - 1, 1) << endl;
    for (int j = 1; j < i; j++) cout << j << " ";
  } else {
    cout << max(i - 1, 1) << endl;
    for (int j = 1; j < i - 1; j++) cout << j << " ";
    cout << n - sum + i - 1 << endl;
  }
}
int main() {
  solve();
  return 0;
}
