#include <bits/stdc++.h>
using namespace std;
const double PI = 3.14159265359;
const double EPS = 1e-6;
const long long INF = ((long long)1 << 62);
const long long P = 1e9 + 7;
const int moves = 100005;
int main() {
  std::ios::sync_with_stdio(false);
  int n;
  cin >> n;
  vector<int> give;
  for (int i = 1; i <= 1000; ++i) {
    if (n - i >= 0) {
      n -= i;
      give.push_back(i);
    }
  }
  if (n > 0) {
    give[(int)give.size() - 1] = give.back() + n;
  }
  cout << give.size() << endl;
  for (int i = 0; i < give.size(); ++i) {
    cout << give[i] << " ";
  }
  return 0;
}
