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