#include<bits/stdc++.h>
#define SZ(x) ((int)x.size())
#define pb push_back
template <typename _Tp>void read(_Tp &x){
	char ch(getchar());bool f(false);while(!isdigit(ch))f|=ch==45,ch=getchar();
	x=ch&15,ch=getchar();while(isdigit(ch))x=x*10+(ch&15),ch=getchar();
	if(f)x=-x;
}
template <typename _Tp,typename... Args>void read(_Tp &t,Args &...args){read(t);read(args...);}
typedef long long ll;
ll f[105];
bool tag[105];
int main(){
	f[0]=1,f[1]=1;for(int i=2;i<=90;++i)f[i]=f[i-1]+f[i-2];
	ll n;read(n);
	int p=0;for(int i=1;i<=90;++i)if(f[i]<=n)p=i;
	std::vector<int> ans;
	ll x=n;
	for(int i=90;i>=0;--i)if(x>=f[i])tag[i]=true,x-=f[i];
	if(p&1){
		for(int i=0;i<=p;++i){
			if(tag[p-i])ans.pb(2-i%2);
			if(i<p)ans.pb(3+i%2);
		}
	}
	else{
		for(int i=0;i<=p;++i){
			if(tag[p-i])ans.pb(i%2+1);
			if(i<p)ans.pb(4-i%2);
		}
	}
	printf("%d\n",SZ(ans));
	for(auto it:ans)printf("%d\n",it);
	return 0;
}
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
constexpr ll mod = 1000000007;

bool tooBig(__int128 x, __int128 y) {
    return (2 * x - y) * (2 * x - y) > 5 * y * y;
}

int main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout << fixed << setprecision(20);
    ll x;
    cin >> x;
    ll l = 0, r = x + 1, y = x;
    while (l < r) {
        ll mid = (l + r) / 2;
        if (tooBig(x, mid)) {
            y = mid;
            l = mid + 1;
        } else {
            r = mid;
        }
    }
    vector<int> ans;
    while (x > 0 && y > 0) {
        if (x > y) {
            while (tooBig(x - 1, y)) {
                ans.push_back(1);
                x--;
            }
            ans.push_back(3);
            x -=y;
        } else {
            while (tooBig(y - 1, x)) {
                ans.push_back(2);
                y--;
            }
            ans.push_back(4);
            y -= x;
        }
    }
    while (x > 0) {
        ans.push_back(1);
        x--;
    }
    while (y > 0) {
        ans.push_back(2);
        y--;
    }
    reverse(ans.begin(), ans.end());
    cout << int(ans.size()) << '\n';
    for (int i : ans) cout << i << '\n';
    return 0;
}