#include <bits/stdc++.h>
int main() {
  int k = 0, i, n, x[101], a, b, t;
  for (int k = 1; k <= 100; k++) x[k] = k;
  scanf("%d", &n);
  for (i = 1; i <= 100; i++) {
    a = (1 + i) * i / 2;
    b = (2 + i) * (i + 1) / 2;
    k++;
    if (a <= n && n < b) break;
  }
  printf("%d\n", k);
  t = n - a;
  for (i = k; i > 0; i--) {
    if (t > 0) {
      x[i]++;
      t--;
    }
    printf("%d", x[i]);
    if (i != 1) printf(" ");
  }
  return 0;
}
