#include <bits/stdc++.h>
using namespace std;
int n, t;
vector<int> res;
int main() {
  while (scanf("%d", &n) == 1) {
    res.clear();
    t = 0;
    if (n <= 2) {
      printf("1\n%d\n", n);
      continue;
    }
    for (int i = 1; i <= n; ++i) {
      t += i;
      if (t <= n) {
        res.push_back(i);
        if (t == n) break;
      } else {
        res[res.size() - 1] += i - t + n;
        break;
      }
    }
    printf("%d\n", (int)res.size());
    for (unsigned int i = 0; i < res.size(); ++i)
      printf("%d%c", res[i], i + 1 == res.size() ? '\n' : ' ');
  }
  return 0;
}
