#include<iostream>
#include<cstdio>
#include<cstring>
using namespace std;
long long f[1000],g[1000];
long long n;
int tmp[1000];
int main()
{
	f[0]=0,f[1]=1;
	for(int n=2;n<=87;n++)
	{
		f[n]=f[n-1]+f[n-2];
		if(f[n]>1e18)break;
	}
	for(int i=0;i<=87;i+=2)g[i>>1]=f[i];
	scanf("%lld",&n);
	int lim=43;while(g[lim]>n)--lim;
	int tn=0;
	for(int i=lim;i>=1;i--)
	{
		while(n>=g[i])tmp[++tn]=2,n-=g[i];
		tmp[++tn]=4,tmp[++tn]=3;
	}
	printf("%d\n",tn);
	for(int i=1;i<=tn;i++)printf("%d\n",tmp[i]);
}
#include <bits/stdc++.h>
#define int long long
using namespace std;

int f[114], n, num;
bool cur_op, yes;
queue <int> ans;
const int inf=1e18;

void init() {
	f[0]=1ll, f[1]=2ll;
	for(num=2;f[num-1]<=inf;++num)
		f[num]=f[num-1]+f[num-2]; --num;
	return ;
}

signed main() {
	cin>>n;init(); 
	for(int i=num; i>=0; --i) {
		while(n>=f[i]) {
			n-=f[i], ans.push(cur_op+1);
			yes=true;
		} cur_op^=1;
		if(yes) ans.push(cur_op+3);
	} cout<<ans.size()<<endl;
	while(!ans.empty())
		cout<<((ans.front()-1)^1)+1<<endl, ans.pop();
  return 0;
}