#include <iostream>
#include <cmath>
#include <climits>
#include <vector>
#include <string>
#include <algorithm>
#include <numeric>
#include <set>
#include <map>
#include <unordered_set>
#include <unordered_map>
#include <queue>
#include <stack>
#include <bitset>
#include <functional>
#include <random>
#include <cassert>

typedef long long ll;
using namespace std;

constexpr ll mod007 = 1000000007;
constexpr ll mod998 = 998244353;


ll N, F[88];
set<int>st;

int main() {
	cin >> N;
	F[1] = 1;
	for (int i = 2; i < 88; i++) {
		F[i] = F[i - 1] + F[i - 2];
	}
	for (int i = 87; i; i--) {
		if (N >= F[i]) {
			N -= F[i];
			st.insert(i);
		}
	}
	cout << 86 + st.size() << endl;
	for (int i = 86; i; i--) {
		if (st.find(i + 1) != st.end()) {
			if (i % 2) {
				cout << 2 << endl;
			}
			else {
				cout << 1 << endl;
			}
		}
		if (i % 2) {
			cout << 3 << endl;
		}
		else {
			cout << 4 << endl;
		}
	}
}
#include "bits/stdc++.h"
//#include "atcoder/all"
using namespace std;
//using namespace atcoder;
//using mint = modint1000000007;
//const int mod = 1000000007;
//using mint = modint998244353;
//const int mod = 998244353;
//const int INF = 1e9;
//const long long LINF = 1e18;
//const bool debug = false;
#define rep(i, n) for (int i = 0; i < (n); ++i)
#define rep2(i,l,r)for(int i=(l);i<(r);++i)
#define rrep(i, n) for (int i = (n-1); i >= 0; --i)
#define rrep2(i,l,r)for(int i=(r-1);i>=(l);--i)
#define all(x) (x).begin(),(x).end()
#define allR(x) (x).rbegin(),(x).rend()
#define endl "\n"
#define P pair<int,int>
template<typename A, typename B> inline bool chmax(A & a, const B & b) { if (a < b) { a = b; return true; } return false; }
template<typename A, typename B> inline bool chmin(A & a, const B & b) { if (a > b) { a = b; return true; } return false; }

int main() {
	ios::sync_with_stdio(false);
	cin.tie(nullptr);
	long long n; cin >> n;
	long long x = 1;
	long long y = 0;
	vector<vector<int>>ans;
	ans.push_back({});
	vector<long long>f;
	rep(i, 43) {
		ans.push_back({ 4 });
		y += x;
		f.push_back(y);
		ans.push_back({ 3 });
		x += y;
		f.push_back(x);
	}
	//cout << ans.size() << endl;
	rrep(i, f.size()) {
		if (n >= f[i]) {
			n -= f[i];
			ans[(ans.size() - 1) - (i + 1)].push_back(1 + (i + 1) % 2);
		}
	}
	vector<int>a;
	rep(i, ans.size()) {
		rep(j, ans[i].size()) {
			if ((0 == a.size()) && (ans[i][j] >= 3))continue;
			a.push_back(ans[i][j]);
		}
	}
	cout << a.size() << endl;
	rep(i, a.size()) cout << a[i] << endl;
	return 0;
}