#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<iostream>
#include<cstdio>
#include<cmath>
#include<algorithm>
#include<climits>
#include<stack>
#include<queue>
#include<set>
#include<array>
#include<cstdlib>
#include<string>
#include<sstream>
#include<cctype>
#include<cstring>
#include<ctime>
#include<functional>
#include<numeric>
#include<map>
#include<list>
#include<bitset>
#include<random>
#include<chrono>
using namespace std;

#define int long long

int fib[100], fibtop;

void makefib()
{
    fib[1] = 1;
    for (int i = 2; fib[i - 1] < LONG_LONG_MAX / 3; i++)
    {
        fib[i] = fib[i - 1] + fib[i - 2];
        fibtop = i + 1;
    }
}

vector<int> getfibfacs(int i)
{
    vector<int> r;
    while (i)
    {
        auto p = lower_bound(fib, fib + fibtop, i);
        if (*p != i) p--;
        r.push_back(p - fib);
        i -= *p;
    }
    return r;
}

signed main()
{
    makefib();
    int n;
    scanf("%lld", &n);
    vector<int> fibfacs = getfibfacs(n);
    vector<int> res;
    bool resultin;
    int curmin;
    if (fibfacs[0] % 2)
        resultin = true;
    else
        resultin = false;
    curmin = 1;
    res.push_back(1);
    for (int i = 1; i < fibfacs[0]; i++)
    {
        res.push_back(curmin ? 4 : 3);
        curmin = !curmin;
    }
    vector<int> inserts(res.size() + 5);
    for (int i = 1; i < (int)fibfacs.size(); i++)
    {
        inserts[fibfacs[0] - fibfacs[i]] = (fibfacs[0] - fibfacs[i]) % 2 ? 2 : 1;
    }
    auto f = [&](int r) -> int
    {
        if (resultin) return r; 
        else
        {
            if (r == 1) return 2;
            if (r == 2) return 1;
            if (r == 3) return 4;
            return 3;
        }
    };
    vector<int> res2;
    for (int i = 0; i < (int)res.size(); i++)
    {
        res2.push_back(f(res[i]));
        if (inserts[i]) res2.push_back(f(inserts[i]));
    }
    printf("%lld\n", res2.size());
    for (int i = 0; i < (int)res2.size(); i++)
    {
        printf("%lld\n", res2[i]);
    }
    return 0;
}