#include <bits/stdc++.h>
using namespace std;
vector<long long> ans;
long long n, cnt = 1, s = 0, ja = -1;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  while (s < n) {
    ans.push_back(cnt);
    s += cnt;
    cnt++;
  }
  for (long long i = 0; i < ans.size(); i++) {
    if (ans[i] == s - n) {
      ja = i;
      break;
    }
  }
  if (ja != -1) {
    swap(ans[ja], ans[ans.size() - 1]);
    ans.pop_back();
  }
  cout << ans.size() << endl;
  for (auto x : ans) cout << x << " ";
}
