#include <bits/stdc++.h>
using namespace std;
class solution {
 public:
  void solve() {
    int n;
    cin >> n;
    int i = 1;
    int prev = 0;
    vector<int> sol;
    while (n != 0) {
      if (n > prev) {
        prev++;
        sol.push_back(prev);
        n = n - prev;
      } else {
        sol[prev - 1] = sol[prev - 1] + n;
        n = 0;
      }
    }
    cout << sol.size() << "\n";
    for (auto it : sol) {
      cout << it << " ";
    }
  }
};
int main() {
  ios::sync_with_stdio(0), cout.tie(0), cin.tie(0);
  long long i = 0;
  solution second;
  second.solve();
  return 0;
}
