#include <bits/stdc++.h>

#define f first
#define s second
#define vec vector
#define pb push_back
#define all(x) x.begin(),x.end()
#define m_p make_pair
#define sz(x) (int)x.size()

using namespace std;


typedef long long ll;
typedef pair<ll,int> pli;
typedef pair<int,int> pii;
typedef pair<ll,ll> pll;
const int K=86;
signed main(){
    ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
    ll n;
    cin>>n;
    ll nn=n;
    vec<ll>fib(K+1);
    fib[0]=1;fib[1]=1;
    for(int i=2;i<=K;i++){
        fib[i]=fib[i-1]+fib[i-2];
    }
//    fib.erase(fib.begin)
    vec<int>ans;
    for(int i=0;i<K;i++){
        if(n>=fib[K-i]){
            if(i%2==0) ans.pb(1);
            else ans.pb(2);
            n-=fib[K-i];
//            cerr<<"N "<<n<<endl;
        }
        if(i%2==0)ans.pb(4);
        else ans.pb(3);
    }
    ll x=0,y=0;
    cout<<sz(ans)<<endl;
    for(auto &z : ans){
        if(z==1) x++;
        if(z==2) y++;
        if(z==3) x+=y;
        if(z==4) y+=x;
        cout<<z<<endl;
    }
//    cerr<<"X "<<x<<endl;
//    assert(x==nn);
//        cout<<z<<endl;
    return 0;
}
/*
5 1
1 2 6 7 10
1 1 1 1 2
3 5
*/

#include "bits/stdc++.h"
//#include "atcoder/all"
using namespace std;
//using namespace atcoder;
//using mint = modint1000000007;
//const int mod = 1000000007;
//using mint = modint998244353;
//const int mod = 998244353;
//const int INF = 1e9;
//const long long LINF = 1e18;
//const bool debug = false;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep2(i,l,r)for(int i=(l);i<(r);++i)
#define rrep(i, n) for (int i = (n-1); i >= 0; --i)
#define rrep2(i,l,r)for(int i=(r-1);i>=(l);--i)
#define all(x) (x).begin(),(x).end()
#define allR(x) (x).rbegin(),(x).rend()
#define endl "\n"
#define P pair<int,int>
template<typename A, typename B> inline bool chmax(A & a, const B & b) { if (a < b) { a = b; return true; } return false; }
template<typename A, typename B> inline bool chmin(A & a, const B & b) { if (a > b) { a = b; return true; } return false; }

int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	long long n; cin >> n;
	long long x = 1;
	long long y = 0;
	vector<vector<int>>ans;
	ans.push_back({});
	vector<long long>f;
	while (true) {
		ans.push_back({ 4 });
		y += x;
		f.push_back(y);
		ans.push_back({ 3 });
		x += y;
		f.push_back(x);
		if (x >= n)break;
	}
	rrep(i, f.size()) {
		if (n >= f[i]) {
			n -= f[i];
			ans[(ans.size() - 1) - (i + 1)].push_back(1 + (i + 1) % 2);
		}
	}
	vector<int>a;
	rep(i, ans.size()) {
		rep(j, ans[i].size()) {
			if ((0 == a.size()) && (ans[i][j] >= 3))continue;
			a.push_back(ans[i][j]);
		}
	}
	cout << a.size() << endl;
	rep(i, a.size()) cout << a[i] << endl;
	return 0;
}