#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;
}
#include <bits/stdc++.h>
using namespace std;

#define REP(i,n) for(int i=0;i<(n);i++)
#define ALL(v) v.begin(),v.end()

using ll=long long;
ll Fib[89];

int main(){
  Fib[0]=Fib[1]=1;
  for(int i=2;i<89;i++)Fib[i]=Fib[i-1]+Fib[i-2];

  ll n;cin>>n;
  vector<int> A;
  for(int i=88;i>=0;i--){
    if(n>=Fib[i]){
      A.push_back(i);
      n-=Fib[i];
    }
  }
  reverse(ALL(A));
  vector<int> ans;
  int now=0;
  for(int i=0;i<88&&now<A.size();i++){
    if(A[now]==i){
      ans.push_back(1+(i&1));
      now++;
    }
    ans.push_back(3+(i&1));
  }
  reverse(ALL(ans));
  cout<<ans.size()<<endl;
  for(int p:ans)cout<<p<<endl;
}
