#include <bits/stdc++.h>
using namespace std;
int main() {
  int N, ct = 0;
  vector<int> ans;
  cin >> N;
  while (1) {
    ct++;
    if (2 * ct + 1 > N) {
      ans.push_back(N);
      cout << ct << endl;
      for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
      cout << endl;
      return 0;
    }
    ans.push_back(ct);
    N -= ct;
  }
}
