#include <iostream>
#include <vector>
using namespace std;
int main()
{
int n;
cin>>n;
vector<int>v;
int g=0;
for(int i=1; ;i++)
{
if(i+g>n)
break;
v.push_back(i);
g+=i;
}
int y=n-g;
v[v.size()-1]+=y;
cout<<v.size()<<endl;
for(int i=0;i<v.size();i++)
cout<<v[i]<<" ";
cout<<endl;
}