#include <bits/stdc++.h>
using namespace std;
long long x;
vector<int>v;
int main()
{
cin>>x;
int i = 1;
while(i <= x)
{
v.push_back(i);
x-=i;
i++;
}
if(x)v[v.size() - 1]+=x;
cout<<v.size()<<endl;
for(auto i : v)cout<<i<<" ";
}