#include <bits/stdc++.h>
int main() {
  int n;
  scanf("%d", &n);
  int m;
  printf("%d\n", m = (int)(sqrt(8 * n + 1) - 1) / 2);
  int s = 0;
  for (int i = 1; i < m; ++i) {
    s += i;
    printf("%d ", i);
  }
  if (n = n - s) printf("%d", n);
}
