#include <ext/pb_ds/assoc_container.hpp>
#include <ext/pb_ds/tree_policy.hpp>
#include <bits/stdc++.h>

using namespace __gnu_pbds;
using namespace std;

using ll = long long;
using ld = long double;

typedef tree<
        int,
        null_type,
        less<int>,
        rb_tree_tag,
        tree_order_statistics_node_update>
        ordered_set;

#define mp make_pair


int MOD =  1e9 + 7;



int mul(int a, int b) {
    return (1LL * a * b) % MOD;
}

int add(int a, int b) {
    int s = (a+b);
    if (s>=MOD) s-=MOD;
    return s;
}

int sub(int a, int b) {
    int s = (a+MOD-b);
    if (s>=MOD) s-=MOD;
    return s;
}

int po(int a, ll deg)
{
    if (deg==0) return 1;
    if (deg%2==1) return mul(a, po(a, deg-1));
    int t = po(a, deg/2);
    return mul(t, t);
}

int inv(int n)
{
    return po(n, MOD-2);
}


mt19937 rnd(time(0));

/*
const int LIM = 1000;

vector<int> facs(LIM), invfacs(LIM);

void init()
{
    facs[0] = 1;
    for (int i = 1; i<LIM; i++) facs[i] = mul(facs[i-1], i);
    invfacs[LIM-1] = inv(facs[LIM-1]);
    for (int i = LIM-2; i>=0; i--) invfacs[i] = mul(invfacs[i+1], i+1);
}

int C(int n, int k)
{
    if (n<k) return 0;
    if (n<0 || k<0) return 0;
    return mul(facs[n], mul(invfacs[k], invfacs[n-k]));
}*/


/*struct DSU
{
    vector<int> sz;
    vector<int> parent;
    void make_set(int v) {
        parent[v] = v;
        sz[v] = 1;
    }

    int find_set(int v) {
        if (v == parent[v])
            return v;
        return find_set(parent[v]);
    }

    void union_sets(int a, int b) {
        a = find_set(a);
        b = find_set(b);

        if (a != b) {
            if (sz[a] < sz[b])
                swap(a, b);
            parent[b] = a;
            sz[a] += sz[b];
        }
    }

    DSU (int n)
    {
        parent.resize(n);
        sz.resize(n);
        for (int i = 0; i<n; i++) make_set(i);
    }
};*/

bool cmp(ll a, ll b)
{
    //a vs b*phi
    //cout<<"Comparing: "<<a<<' '<<b<<endl;
    if (a==0) return false;
    if (b==0) return true;
    if (a<=b) return false;
    if (a>=2*b) return true;
    return (!cmp(b, a-b));
}

int main()
{
    ios_base::sync_with_stdio(0);
    cin.tie(nullptr);

    ll n; cin>>n;

    ld kek = ((ld)(1) + sqrt(5))/(ld)(2);

    ll n1 = n/kek;

    //cout<<n<<' '<<n1<<endl;

    while (cmp(n, n1+1)) n1++;


    while (!cmp(n, n1-1)) n1--;

    //cout<<n<<' '<<n1<<endl;

    vector<int> ops;
    while (n>0 && n1>0)
    {
        //cout<<n<<' '<<n1<<endl;
        if (n>=n1)
        {
            if (cmp(n-1, n1))
            {
                n--; ops.push_back(1);
                continue;
            }
            else if (!cmp(n, n1-1))
            {
                n1--; ops.push_back(2);
                continue;
            }
            n-=n1; ops.push_back(3);
        }
        else
        {
            if (cmp(n1-1, n))
            {
                n1--; ops.push_back(2);
                continue;
            }
            else if (!cmp(n1, n-1))
            {
                n--; ops.push_back(1);
                continue;
            }
            n1-=n; ops.push_back(4);
        }
    }

    while (n>0)
    {
        n--; ops.push_back(1);
    }

    while (n1>0)
    {
        n1--; ops.push_back(2);
    }

    reverse(ops.begin(), ops.end());
    cout<<ops.size()<<endl;
    for (auto it: ops) cout<<it<<endl;

}

/*
 (x, y) ->
 (x+1, y)
 (x, y+1)
 (x+y, y)
 (x, x+y)

 (0, 0):


988988988988988988



 */

#include <bits/stdc++.h>
using namespace std;
int main(){
    long long N;
    cin >> N;
    vector<int> ans;
    long long INF = 1000000000000000000;
    vector<long long> fib(87, INF);
    fib[0] = 1;
    fib[1] = 1;
    for(int i = 2; i < 87; i++){
        fib[i] = fib[i - 1] + fib[i - 2];
    }
    vector<int> ind;
    for(int i = 86; i >= 0; i--){
        if(N >= fib[i]) {
            N -= fib[i];
            ind.push_back(86 - i);
        }
    }
    int id = 0;
    for(int i = 0; i < 86; i++){
        if(i > 0){
            if(i % 2 == 0){
                ans.push_back(3);
            }
            else{
                ans.push_back(4);
            }
        }
        while(id < ind.size() && ind[id] == i){
            if(i % 2 == 0){
                ans.push_back(1);
            }
            else ans.push_back(2);
            id++;
        }
    }
    long long x = 0, y = 0;
    ans.push_back(3);
    for(int i = 0; i < ans.size(); i++){
        if(ans[i] == 1) x++;
        else if(ans[i] == 2) y++;
        else if(ans[i] == 3) x = x + y;
        else y = x + y;
    }
    cout << ans.size() << endl;
    for(int t: ans) cout << t << endl;
}