#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll n;
cin >> n;
vector<ll> answer;
for (ll i = 1; n - i > i; i++) {
answer.push_back(i);
n -= i;
}
if (n > 0) {
answer.push_back(n);
}
cout << answer.size() << endl;
for (ll x : answer) {
printf("%lld ", x);
}
puts("");
}