#pragma region Macros
#include <bits/stdc++.h>
#if defined(LOCAL) || defined(ONLINE_JUDGE) || defined(_DEBUG)
#include <atcoder/all>
#endif
using namespace std;
#define REP(i, n) for(int i=0, i##_len=(n); i<i##_len; ++i)
#define REPR(i, n) for(int i=(n); i>=0; --i)
#define FOR(i, n, m) for(int i=(m), i##_len=(n); i<i##_len; ++i)
#define EACH(i, v) for(const auto& i : v)
#define ALL(x) (x).begin(),(x).end()
#define ALLR(x) (x).rbegin(),(x).rend()
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 (b<a) { a=b; return 1; } return 0; }
template<class T>using vec = vector<T>;
template<class T, class U>using umap = unordered_map<T, U>;
template<class T>using uset = unordered_set<T>;
using ll = long long;
using ld = long double;
using P = pair<ll, ll>;
//using T = tuple<ll, ll, ll>;
using vl = vec<ll>;
#define fi first
#define se second
#define el endl
constexpr ll INF = numeric_limits<ll>::max()/2-1;
#pragma endregion

#pragma region IOMacros
template<class T>
istream &operator>>(istream &stream, vec<T>& o){REP(i, o.size())stream >> o[i];return stream;}
template<class T>
ostream &operator<<(ostream &stream, vec<T>& objs){REP(i, objs.size())stream << objs[i] << " ";stream << el;return stream;}

#define I(T, ...) ;T __VA_ARGS__;__i(__VA_ARGS__);
void __i() {}
template<class T, class... Ts> void __i(T&& o, Ts&&... args){cin >> o;__i(forward<Ts>(args)...);}

void O() {cout << el;}
template<class T, class... Ts> void O(T&& o, Ts&&... args){cerr << o << " ";O(forward<Ts>(args)...);}
#pragma endregion

void Main();

int main(){
    std::cin.tie(nullptr);
    std::cout << std::fixed << std::setprecision(15);
    Main();
    return 0;
}

vl fibb(const vl& seed, ll N){
    vl fib(seed.size());
    copy(ALL(seed), fib.begin());
    for(ll i = seed.size();;i++){
        ll t = fib[i-1]+fib[i-2];
        if(t > N) break;
        fib.push_back(t);
    }
    return fib;
}

void Main(){
    I(ll, N);
    vl seed({0, 1});
    vl fib = fibb(seed, N);
    ll cnt = 1 + fib.size() - 2;
    ll i = 1;
    ll siz = fib.size();
    if(fib[fib.size()-1] == N){
        goto last;
    }
    while(1){
        seed[i]++;cnt++;
        fib = fibb(seed, N);
        if(fib[fib.size()-1] == N){
            goto last;
        }
        if(siz > fib.size()){
            seed[i]--;
            seed.push_back(seed[i-1] + seed[i]);
            i++;
        }
    }
last:
    //cout << fib << el;
    bool x = fib.size()&1;
    vl ans;
        // 逆かも
    REP(i, fib[1]){
        ans.push_back(x+1);
    }
    x = !x;
    ans.push_back(x+3);
    FOR(i, fib.size(), 2){
        REP(j, fib[i]-fib[i-1]-fib[i-2]){
            ans.push_back(x+1);
        }
        x = !x;
        ans.push_back(x+3);
    }
    ll s = min(130, (int)ans.size());
    cout << s << el;
    REP(i, s){
        cout << ans[i] << el;
    }
}

#include <iostream>
#include <cstdio>
#include <vector>
#include <set>
#include <map>

#define int long long
#define REP(i, n) for (int i = 0, i##_len = (n); i < i##_len; ++i)
#define FOR(i, a, b) for (int i = (a), i##_len = (b); i <= i##_len; ++i)
#define REV(i, a, b) for (int i = (a); i >= (b); --i)
#define CLR(a, b) memset((a), (b), sizeof(a))
#define DUMP(x) cout << #x << " = " << (x) << endl;
#define INF 1001001001001001001ll
#define fcout cout << fixed << setprecision(12)

using namespace std;

class CCalculator {
public:
    map<int, int> memo;

    int fib(int n) {
        if (n == 1 || n == 2) return 1;
        if (memo.count(n)) return memo[n];
        return memo[n] = fib(n - 1) + fib(n - 2);
    }

    void solve(std::istream& cin, std::ostream& cout) {
        int N;
        cin >> N;
        set<int> s;
        REV(i, 90, 0) {
            int val = fib(i + 1);
            if (N >= val) {
                N -= val;
                s.insert(i + 1);
            }
        }

        int num = *s.rbegin();
        if (num % 2 == 0) num++;

        vector<int> res;
        FOR(i, 1, num) {
            if (i % 2 == 1) {
                res.push_back(3);
            } else {
                res.push_back(4);
            }
            if (s.count(num - i + 1)) {
                if (i % 2 == 1) {
                    res.push_back(1);
                } else {
                    res.push_back(2);
                }
            }
        }
        cout << res.size() << endl;
        REP(i, res.size()) cout << res[i] << endl;
    }
};


signed main() {
    ios::sync_with_stdio(false);
    cin.tie(nullptr);
    cout.tie(nullptr);
    std::istream& in(std::cin);
    std::ostream& out(std::cout);

    CCalculator solver;
    solver.solve(in, out);
    return 0;
}