#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
int n;
int ans;
int a[1005];
int main() {
  cin.tie(0);
  ios::sync_with_stdio(false);
  cin >> n;
  for (int i = 1; i <= n; i++) {
    if (n - i * (i + 1) / 2 <= i) {
      ans = i;
      break;
    }
  }
  for (int i = 1; i <= ans; i++) {
    a[i] = i;
  }
  int c = n - ans * (ans + 1) / 2;
  while (c) {
    for (int i = ans; i >= 1; i--) {
      if (c == 0) break;
      a[i]++;
      c--;
    }
  }
  cout << ans << endl;
  for (int i = 1; i <= ans; i++) {
    cout << a[i] << " ";
  }
  cout << endl;
}
