#include <bits/stdc++.h>
using namespace std;
int main() {
  int T;
  cin >> T;
  int N = int(sqrt(2 * T + .25) - .5);
  cout << N << endl;
  int x = T - N * (N + 1) / 2;
  for (int i = N; i; --i) {
    if (x-- > 0)
      cout << i + 1;
    else
      cout << i;
    cout << ' ';
  }
  return 0;
}
