#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, at, cont, v[1000];
  scanf("%d", &n);
  i = 1;
  at = 0;
  cont = 0;
  while (1) {
    if (at + i + i + 1 > n) {
      v[cont++] = n - at;
      break;
    }
    at += i;
    v[cont++] = i++;
  }
  printf("%d\n", cont);
  for (i = 0; i < cont; i++) printf("%d ", v[i]);
}
