#include <bits/stdc++.h>
using namespace std;
long long sumd(long long n) {
  long long sum = 0;
  while (n > 0) {
    sum += n % 10;
    n /= 10;
  }
  return sum;
}
int32_t main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long k, ans;
  cin >> k;
  for (long long n = 0; n < 1000; n++)
    if ((n * (n + 1)) / 2 > k) {
      ans = n - 1;
      break;
    }
  cout << ans << endl;
  for (long long i = 1; i < ans; i++) {
    cout << i << " ";
    k -= i;
  }
  cout << k << endl;
  return 0;
}
