#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, k = 0;
  cin >> n;
  vector<int> candies;
  while (n) {
    k++;
    if (k >= n || (n - k) <= k) k = n;
    candies.push_back(k);
    n -= k;
  }
  cout << candies.size() << "\n";
  for (auto v : candies) cout << v << " ";
  cout << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cout.tie(0);
  cin.tie(0);
  solve();
  return 0;
}
