#include <bits/stdc++.h>

using ll = long long;
const int N(1010);
ll n, f[N];
int pos, fl[N];
std::vector<int> ans;

int main()
{
	std::scanf("%lld", &n), f[1] = 1;
	for (int i = 2; i <= 90; i++) f[i] = f[i - 1] + f[i - 2];
	for (int i = 90; i; i--)
		if (n >= f[i]) n -= f[i], fl[i] = 1, pos = std::max(pos, i);
	for (int i = pos, j = 1; i; i--, j++)
	{
		if (fl[i])
		{
			if (i & 1) ans.push_back(1);
			else ans.push_back(2);
		}
		if (j & 1) ans.push_back(4);
		else ans.push_back(3);
	}
	printf("%lu\n", ans.size());
	for (auto i : ans) printf("%d\n", i);
	return 0;
}

#include <bits/stdc++.h>
#define rep(i,n) for ((i)=1;(i)<=(n);(i)++)
#define rep0(i,n) for ((i)=0;(i)<(n);(i)++)
using namespace std;
long long n,m,s,i;
vector<int> ans;
long long gcd(long long x,long long y){
	if(!y) return x;
	long long t=gcd(y,x%y);
	s+=x/y;return t;
}
void print(long long x,long long y){
	if(!x){
		while(y--)ans.push_back(2);
		return; 
	}
	if(!y){
		while(x--)ans.push_back(1);
		return; 
	}
	if(x>y){
		while(x>=y){
			ans.push_back(3);
			x-=y;
		}
	}
	else{
		while(x<=y){
			ans.push_back(4);
			y-=x;
		}
	}
	print(x,y);
}
int main(){
	srand(time(NULL));
	cin>>n;
	for(;;){
		m=(rand()+rand()*65536ll+rand()*65536ll*65536ll/*+rand()*65536ll*65536ll*65536ll*/)%n;
		s=0;
		long long g=gcd(n,m);
		if(s+g>130) continue;
		print(n,m);
		printf("%d\n",ans.size());reverse(ans.begin(),ans.end());
		rep0(i,ans.size())printf("%d\n",ans[i]);
		return 0;
	}
	return 0;
}