#include <vector>
#include <array>
#include <stack>
#include <queue>
#include <list>
#include <bitset>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <algorithm>
#include <numeric>
#include <iostream>
#include <iomanip>
#include <string>
#include <chrono>
#include <random>
#include <cmath>
#include <cassert>
#include <climits>
#include <cstring>
#include <cstdlib>
#include <functional>
#include <sstream>

using namespace std;


int main(int argc, char** argv) {
    ios::sync_with_stdio(false);
    cin.tie(0);
    cout << fixed << setprecision(12);

    long long n;
    cin >> n;


    vector<long long> fibs;
    fibs.push_back(1);
    fibs.push_back(1);

    while (fibs.back() < n) {
        long long x = fibs[fibs.size() - 2] + fibs[fibs.size() - 1];
        fibs.push_back(x);
    }


    const int LIMIT = 130;
    // const int LIMIT = 0;
    vector<int> res;
    if (n < LIMIT) {
        for (int i = 0; i < n; ++i) {
            res.push_back(1);
        }
    } else {
        int m = fibs.size();

        if (fibs.back() == n) {
            for (int i = m - 1, t = 3; i > 1; --i, t = 7 - t) {
                res.push_back(t);
            }
            res.push_back(1);
            res.push_back(2);
        } else {
            assert(fibs.back() > n);

            vector<int> coes(m, 0);
            {
                long long x = n - fibs[m - 2];
                // cout << "X " << x << endl;
                for (int i = m - 1; i >= 0; --i) {
                    coes[i] = x / fibs[i];
                    x -= coes[i] * 1LL * fibs[i];
                }
            }

            for (int i = m - 2, j = 0, t = 3; i > 1; --i, t = 7 - t, ++j) {
                for (int k = 0; k < coes[j]; ++k) {
                    res.push_back(t >> 1);
                }
                res.push_back(t);
            }
            res.push_back(1);
            res.push_back(2);
        }
        reverse(res.begin(), res.end());
    }

    auto calc = [&](vector<int>& ops) {
        long long x = 0;
        long long y = 0;
        for (auto op : ops) {
            if (op == 1) {
                ++x;
            } else if (op == 2) {
                ++y;
            } else if (op == 3) {
                x += y;
            } else {
                assert(op == 4);
                y += x;
            }
        }
        return x;
    };

    // cout << calc(res) << " | " << n << endl;



    cout << res.size() << '\n';
    for (auto x : res) {
        cout << x << '\n';
    }

    return 0;
}
#include <bits/stdc++.h>

#define rep(i,n) for(int i=0;i<(int)(n);i++)
#define FOR(i,n,m) for(int i=(int)(n); i<=(int)(m); i++)
#define RFOR(i,n,m) for(int i=(int)(n); i>=(int)(m); i--)
#define ITR(x,c) for(__typeof(c.begin()) x=c.begin();x!=c.end();x++)
#define RITR(x,c) for(__typeof(c.rbegin()) x=c.rbegin();x!=c.rend();x++)
#define setp(n) fixed << setprecision(n)

template<class T> bool chmax(T &a, const T &b) { if (a<b) { a=b; return 1; } return 0; }
template<class T> bool chmin(T &a, const T &b) { if (a>b) { a=b; return 1; } return 0; }

#define ll long long
#define vll vector<ll>
#define vi vector<int>
#define pll pair<ll,ll>
#define pi pair<int,int>

#define all(a) (a.begin()),(a.end())
#define rall(a) (a.rbegin()),(a.rend())
#define fi first
#define se second
#define pb push_back
#define ins insert

#define debug(a) cerr<<(a)<<endl
#define dbrep(a,n) rep(_i,n) cerr<<(a[_i])<<" "; cerr<<endl
#define dbrep2(a,n,m) rep(_i,n){rep(_j,m) cerr<<(a[_i][_j])<<" "; cerr<<endl;}

using namespace std;

template<class A, class B>
ostream &operator<<(ostream &os, const pair<A,B> &p){return os<<"("<<p.fi<<","<<p.se<<")";}
template<class A, class B>
istream &operator>>(istream &is, pair<A,B> &p){return is>>p.fi>>p.se;}

template<class T>
vector<T> make_vec(size_t a){
	return vector<T>(a);
}
template<class T, class... Ts>
auto make_vec(size_t a, Ts... ts){
	return vector<decltype(make_vec<T>(ts...))>(a, make_vec<T>(ts...));
}

//-------------------------------------------------

int main(void)
{
    cin.tie(0);
    ios::sync_with_stdio(false);
    ll N; cin>>N;
    vll fib(2); fib[0]=fib[1]=1;
    for(int i=2; fib[i-2]+fib[i-1]<=N; i++){
        fib.pb(fib[i-2]+fib[i-1]);
    }
    int F = fib.size();

    set<int> se;
    RFOR(i,F-1,0){
        if (fib[i]>N) continue;
        se.ins(i);
        N-=fib[i];
    }

    vi ans;
    RFOR(i,F-1,0){
        if (se.count(i)){
            if (i&1) ans.pb(2);
            else ans.pb(1);
        }
        if (i&1) ans.pb(3);
        else ans.pb(4);
    }
    int K = ans.size();
    cout<<K<<"\n";
    rep(i,K) cout<<ans[i]<<"\n";

    return 0;
}
