#include <bits/stdc++.h>
using namespace std;
using LL = long long;
LL N, fib[100];
vector<int> ans;
int vis[100];
void print() {
    LL x = 0, y = 0;
    for (int i : ans) {
        if (i == 1) x++;
        if (i == 2) y++;
        if (i == 3) x = x + y;
        if (i == 4) y = x + y;
    }
    cerr << x << endl;
}
int main() {
#ifndef ONLINE_JUDGE
    freopen("cpp.in", "r", stdin);
#endif
    fib[0] = fib[1] = 1;
    for (int i = 2; i < 90; i++) fib[i] = fib[i - 1] + fib[i - 2];
    cin >> N;
    for (int i = 89; ~i; i--)
        if (N >= fib[i]) N -= fib[i], vis[i] = 1;
	int lim = 0;
	for (int i = 1; i < 90; i++) if (vis[i]) lim = i;
    for (int i = lim, j = 1; ~i; i--, j++) {
        if (vis[i]) {
            if (i & 1) ans.push_back(2);
            else ans.push_back(1);
        }
        if (j & 1) ans.push_back(4);
        else ans.push_back(3);
    }
    //print();
    printf("%lu\n", ans.size());
    for (int i : ans) printf("%d\n", i);
    return 0;
}
#include <bits/stdc++.h>
using namespace std;
#define SZ(x) ((int)(x).size())
#define all(x) (x).begin(), (x).end()
#define loop(i, a) for (int i = 0; i < (a); ++i)
#define cont(i, a) for (int i = 1; i <= (a); ++i)
#define circ(i, a, b) for (int i = (a); i <= (b); ++i)
#define range(i, a, b, c) for (int i = (a); (c) > 0 ? i <= (b) : i >= (b); i += (c))
#define parse(it, x) for (auto &it : (x))
#define pub push_back
#define pob pop_back
#define emb emplace_back
#define mak make_pair
#define mkt make_tuple
typedef long long ll;
typedef long double lf;
const int Inf = 0x3f3f3f3f;
const ll INF = 0x3f3f3f3f3f3f3f3fll;

mt19937_64 Rand(chrono::steady_clock::now().time_since_epoch().count());
ll n;

ll calc(ll x) {
    ll y = n;
    ll cs = 0;
    while (y) {
        cs += x / y;
        x %= y;
        swap(x, y);
    }
    return cs + x;
}

int main() {
    cin >> n;
    while (1) {
        ll m = uniform_int_distribution<ll>(0, n)(Rand);
        if (calc(m) <= 130) {
            ll x = n, y = m;
            vector<int> ans;
            while (x && y) {
                if (x < y) {
                    y -= x;
                    ans.pub(4);
                }
                else {
                    x -= y;
                    ans.pub(3);
                }
            }
            while (x) --x, ans.pub(1);
            while (y) --y, ans.pub(2);
            reverse(all(ans));
            printf("%d\n", SZ(ans));
            parse(i, ans) printf("%d\n", i);
            return 0;
        }
    }
}