#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int s = 0, q = -1;
  for (int i = 1; s + i <= n; s += i, q = i, i++)
    ;
  printf("%d\n", q);
  for (int i = 1; i < q; i++) {
    printf("%d ", i);
  }
  printf("%d\n", q + n - s);
  return 0;
}
