#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
const long double k=0.6180339887498948482045;
ll x,y,tmp;
vector<int> ans;
int main(){
	scanf("%lld",&tmp);if(tmp==0) {printf("0\n");return 0;}
	//printf("%lf\n",((long double)tmp)*k-50);
	for(ll i=max((ll)(((long double)tmp)*k)-50,0ll);;i++){
		x=tmp;y=i;ans.clear();
		while(x&&y){
			if(x>y) ans.push_back(3),x=x-y;
			else ans.push_back(4),y=y-x;
			if(ans.size()>130) {break;}
		}
		if(ans.size()+max(x,y)<=130){
			if(x) for(int i=1;i<=x;i++) ans.push_back(1);
			else for(int i=1;i<=y;i++) ans.push_back(2);
			printf("%d\n",ans.size());
			for(int i=ans.size()-1;i>=0;i--) printf("%d\n",ans[i]);
			return 0;
		}
	}
	return 0;
}/*
47584759575744849
*/
#include <bits/stdc++.h>

using namespace std;
#define rep(i,n) for(int i=0;i<n;++i)
#define rep1(i,n) for(int i=1;i<=n;++i)
#define debug(output) if(debugFlag)cout<<#output<<"= "<<output<<endl
using lint = long long;
typedef pair<int,int> P;
const bool debugFlag=true;
const lint linf=1e18+7;
const lint inf=1e9+7;
const int MOD=1000000007;
signed main(){
  lint n;cin>>n;
  queue<int> que;
  vector<lint> dp={1,1,2};
  while(dp.back()<linf){
    int num=dp.size();
    dp.push_back(dp[num-1]+dp[num-2]);
  }
  lint buf=n;
  int num=0;
  for(int i=dp.size()-1;i>=0;--i){
    while(dp[i]<=buf){
      buf-=dp[i];
      que.push(i);
      num=max(num,i);
    }
  }
  vector<int> res;
  num+=num%2;
  int cnt=num;
  que.push(-inf);
  rep(i,num){
    while(que.front()==cnt){
      if(que.front()==cnt){
        que.pop();
        if(i%2==0)res.push_back(1);
        else res.push_back(2);
      }
    }
    if(i%2==0)res.push_back(4);
    else res.push_back(3);
    --cnt;
  }
  cout<<res.size()<<"\n";
  rep(i,res.size()){
    cout<<res[i]<<"\n";
  }
  return 0;
}