//  “Alhamdulillah for Everything”
#include<bits/stdc++.h>
using namespace std;

#define      pai              acos(-1)
#define      ff               first
#define      ss               second
#define      ll               long long
#define      pb               push_back
#define      mp               make_pair
#define      pll              pair<ll,ll>
#define      sz(a)            (ll)a.size()
#define      endl             "\n"
#define      gcd(a, b)        __gcd(a, b)
#define      lcm(a, b)        ((a*b)/gcd(a,b))
#define      all(vec)         vec.begin(),vec.end()
#define      ms(a, b)         memset(a,b,sizeof(a))
#define      rep(i,n)         for(int i= 0; i < int(n); i++)
#define      rep1(i,n)        for(int i= 1; i <= n; i++)
#define      TEST_CASE(t)     for(int zz=1;zz<=t;zz++)
#define      PRINT_CASE       printf("Case %d: ",zz)
#define      fii              freopen("input.txt","r",stdin);
#define      foo              freopen("output.txt","w",stdout);
#define      boom             ios_base::sync_with_stdio(0);cin.tie(NULL);cout.tie(NULL);

const ll M   = 1e9+7;
const ll mxn = 1e5+7;
const ll inf = 1e18;

int  main()
{
    ll i,j,k,a,b,c,d,n,m,t,x,y,z,u,v;
    cin>>n;
    ll ans=0;
    for(i=1;((i*(i+1))/2)<=n;i++)
    {
        a=n;
        a-=(i*(i+1))/2;
        if(a%i==0)
        {
            ans+=1;
        }
    }
    ans<<=1;
    cout<<ans<<endl;
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define LL long long
#define pb push_back

LL n;
LL F[91];
vector<int> seq;
vector<int> ans;

int main()
{
	cin>>n;
	F[1]=F[2]=1;
	for(int i=3;i<=90;i++)
		F[i]=F[i-1]+F[i-2];
	for(int i=90;i>=1;i--)
		if(n>=F[i]) n-=F[i],seq.pb(1);
		else if(seq.size()) seq.pb(0);
	reverse(seq.begin(),seq.end());
	seq.pop_back();
	reverse(seq.begin(),seq.end());
	int P=seq.size()&1;
	ans.pb(1+P);
	for(int i=0;i<seq.size();i++)
	{
		P=1-P;
		ans.pb(3+P);
		if(seq[i]) ans.pb(1+P);
	}
	cout<<ans.size()<<'\n';
	for(int i=0;i<ans.size();i++)
		cout<<ans[i]<<'\n';
	
	return 0;
}