#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <exception>
#include <fstream>
#include <functional>
#include <iomanip>
#include <ios>
#include <iosfwd>
#include <iostream>
#include <istream>
#include <iterator>
#include <limits>
#include <list>
#include <locale>
#include <map>
#include <memory>
#include <new>
#include <numeric>
#include <ostream>
#include <queue>
#include <set>
#include <sstream>
#include <stack>
#include <stdexcept>
#include <streambuf>
#include <string>
#include <typeinfo>
#include <utility>
#include <valarray>
#include <vector>
#include <climits>
#include <cstring>
#include <cassert>


using namespace std;
//using namespace atcoder;

#define REP(i, n) for (int i=0; i<(n); ++i)
#define RREP(i, n) for (int i=(int)(n)-1; i>=0; --i)
#define FOR(i, a, n) for (int i=(a); i<(n); ++i)
#define RFOR(i, a, n) for (int i=(int)(n)-1; i>=(a); --i)

#define SZ(x) ((int)(x).size())
#define ALL(x) (x).begin(),(x).end()

#define DUMP(x) cerr<<#x<<" = "<<(x)<<endl
#define DEBUG(x) cerr<<#x<<" = "<<(x)<<" (L"<<__LINE__<<")"<<endl;

template<class T>
ostream &operator<<(ostream &os, const vector<T> &v) {
    os << "[";
    REP(i, SZ(v)) {
        if (i) os << ", ";
        os << v[i];
    }
    return os << "]";
}

template<class T, class U>
ostream &operator<<(ostream &os, const pair<T, U> &p) {
    return os << "(" << p.first << " " << p.second << ")";
}

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

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

using ll = long long;
using ull = unsigned long long;
using ld = long double;
using P = pair<int, int>;
using vi = vector<int>;
using vll = vector<ll>;
using vvi = vector<vi>;
using vvll = vector<vll>;

const ll MOD = 1e9 + 7;
const int INF = INT_MAX / 2;
const ll LINF = LLONG_MAX / 2;
const ld eps = 1e-9;

ull rnd(void) {
    static ull y = 2463534242;
    y = y ^ (y << 13);
    y = y ^ (y >> 17);
    return y = y ^ (y << 5);
}

// edit
ll LIM = 130;

int rec(ll x, ll y) {
    if (x == 0 && y == 0) {
        return 0;
    }
    if (x == y) {
        return x + y;
    }
    if (x == 0) {
        return y;
    }
    if (y == 0) {
        return x;
    }
    if (x > y) {
//        return 1 + rec(x - y, y);
        if (x / y > LIM) return INF;
        return 1 + rec(x - y, y);
    }
    if (x < y) {
        if (y / x > LIM) return INF;
        return 1 + rec(x, y - x);
    }

    return INF;
}

void solver(ll x, ll y, vector<int> &O) {
    if (x == y) {
        if (x == 0) return;
        REP(i, x) {
            O.push_back(1);
        }
        REP(i, y) {
            O.push_back(2);
        }
    }
    if (x == 0) {
        REP(i, y) {
            O.push_back(2);
        }
    }
    if (y == 0) {
        REP(i, x) {
            O.push_back(1);
        }
    }
    if (x > y) {
        O.push_back(3);
        solver(x - y, y, O);
    }
    if (x < y) {
        O.push_back(4);
        solver(x, y - x, O);
    }
}

void solve() {
//    ll N = 100;
//    REP(i, N) {
//        cout << i << " " << rec(N, i) << endl;
//    }
    ll N;
    cin >> N;
    if (N == 1) {
        cout << 1 << endl;
        cout << 1 << endl;
        return;
    }
    ll y;
    while (true) {
        y = rnd() % (N - 1) + 1;
        ll val = rec(N, y);
        if (val <= LIM) {
//            cout << val << endl;
            break;
        } else {
//            cerr << y << " " << val << endl;
        }
    }

    vector<int> ans;
    solver(N, y, ans);
    assert(ans.size() <= LIM);
    reverse(ALL(ans));

    cout << ans.size() << endl;
    for (auto e : ans) {
        cout << e << endl;
    }


}


int main() {
    cin.tie(0);
    ios::sync_with_stdio(false);
    cout << fixed << setprecision(10);
//    std::ifstream in("input.txt");
//    std::cin.rdbuf(in.rdbuf());

    solve();


    return 0;
}

//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
using namespace std;
#define rep(i, n) for(int i=0; i<n; ++i)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(), v.rend()
using ll = int64_t;
using ull = uint64_t;
using ld = long double;
using P = pair<int, int>;
using vs = vector<string>;
using vi = vector<int>;
using vvi = vector<vi>;
template<class T> using PQ = priority_queue<T>;
template<class T> using PQG = priority_queue<T, vector<T>, greater<T>>;
const int INF = 0xccccccc;
const ll LINF = 0xcccccccccccccccLL;
template<typename T1, typename T2>
inline bool chmax(T1 &a, T2 b) {return a < b && (a = b, true);}
template<typename T1, typename T2>
inline bool chmin(T1 &a, T2 b) {return a > b && (a = b, true);}
template<typename T1, typename T2>
istream &operator>>(istream &is, pair<T1, T2> &p) { return is >> p.first >> p.second;}
template<typename T1, typename T2>
ostream &operator<<(ostream &os, const pair<T1, T2> &p) { return os << p.first << ' ' << p.second;}

#define N 90
ll fib[N];

//head



int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  fib[0] = 1;
  fib[1] = 1;
  for(int i = 2; i < N; i++) fib[i] = fib[i-1]+fib[i-2];
  ll n;
  cin >> n;
  vi ans;
  int fi = 1;
  for(auto i = N-1; i > 0; i--) {
    if(fib[i] <= n) {
      fi = 0;
      ans.emplace_back(i&1?2:1);
      n -= fib[i++];
    }
    else {
      if(fi) continue;
      ans.emplace_back(i&1?3:4);
    }
  }
  int k = ans.size();
  cout << k << endl;
  rep(i, k) cout << ans[i] << '\n';
  ll x = 0, y = 0;
  rep(i, k) {
    if(ans[i] == 1) x++;
    if(ans[i] == 2) y++;
    if(ans[i] == 3) x += y;
    if(ans[i] == 4) y += x;
  }
  //cerr << x << ' ' << y << endl;
}