#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, flag = 0, pos;
  cin >> n;
  int a[1001];
  a[0] = 0;
  for (int i = 1; i <= 100; i++) {
    a[i] = a[i - 1] + i;
    if (a[i] == n) {
      flag = 1;
      pos = i;
    }
    if (n > a[i - 1] && n < a[i]) pos = i - 1;
  }
  if (flag == 1) {
    cout << pos << "\n";
    for (int i = 1; i <= pos; i++) cout << i << " ";
  } else {
    int extra = n - a[pos];
    cout << pos << "\n";
    for (int i = 1; i <= pos; i++) {
      if (i == pos)
        cout << i + extra;
      else
        cout << i << " ";
    }
  }
  return 0;
}
