#include <bits/stdc++.h>
using namespace std;
const int mod = 1e9 + 7;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n = 0;
  cin >> n;
  vector<int> ans;
  int k = 0;
  if (n == 1) {
    cout << 1 << endl << 1;
    return 0;
  }
  for (int i = 1; i <= n; i++) {
    ans.push_back(i);
    if (n - i >= 0)
      n -= i;
    else
      break;
  }
  if (n == 0) {
    cout << ans.size() << endl;
    for (int i = 0; i < ans.size(); i++) cout << ans[i] << " ";
  } else {
    cout << ans.size() << endl;
    sort(ans.begin(), ans.end());
    for (int i = 0; i < ans.size() - 1; i++) cout << ans[i] << " ";
    cout << ans[ans.size() - 1] + n;
    return 0;
  }
}
