#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  int a[50];
  for (int i = 1; i <= 50; i++) a[i - 1] = (i * (i + 1)) / 2;
  int i;
  for (i = 1; i <= 50; i++) {
    if (n <= a[i - 1]) break;
  }
  if (n == 1)
    cout << "1\n1";
  else if (n == 2)
    cout << "1\n2";
  else if (n == 3)
    cout << "2\n1 2";
  else {
    if (n == a[i - 1]) {
      cout << i << "\n";
      for (int j = 1; j <= i; j++) cout << j << " ";
    } else {
      cout << i - 1 << "\n";
      for (int j = 1; j <= i - 2; j++) cout << j << " ";
      cout << n - a[i - 3];
    }
  }
}
