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