#include <bits/stdc++.h>
using namespace std;

typedef long long ll;

const ll lim = 1000000000000000000ll;

vector <ll> seq;

const int Maxn = 90;

bool op[Maxn];
vector <int> res;

int main()
{
	seq.push_back(1);
	seq.push_back(1);
	while (seq.back() <= lim) {
		ll nw = seq.back() + seq[int(seq.size()) - 2];
		seq.push_back(nw);
	}
	ll n; scanf("%lld", &n);
	while (n > 0) {
		int ind = upper_bound(seq.begin(), seq.end(), n) - seq.begin() - 1;
		n -= seq[ind];
		op[Maxn - 1 - ind] = true;
	}
	int p = 0;
	while (!op[p]) p++;
	while (p < Maxn) {
		if (p % 2 == 0) {
			res.push_back(4);
			if (op[p])
				res.push_back(2);
		} else {
			res.push_back(3);
			if (op[p])
				res.push_back(1);
		}
		p++;
	}
	printf("%d\n", int(res.size()));
	for (int i = 0; i < res.size(); i++)
		printf("%d\n", res[i]);
    return 0;
}

#include <iostream>
#include <cassert>
#include <vector>
#include <algorithm>
using namespace std;

int main(){
  long long n;
  cin >> n;
  long long x = 0, y = 0;
  vector<int> Q;
  auto q = [&](int i){
    if(i == 0){
      x += 1;
    }
    if(i == 1){
      y += 1;
    }
    if(i == 2){
      x += y;
    }
    if(i == 3){
      y += x;
    }
    Q.emplace_back(i);
  };
  vector<long long> F(2,0);
  F[1] = 1;
  for(int i = 2; i < 130; ++i){
    long long t = F[i-1] + F[i-2];
    if(t > n) break;
    F.emplace_back(t);
  }
  vector<int> A;
  long long n_ = n;
  for(int i = F.size()-1; i >= 0; --i){
    if(F[i] <= n_){
      A.emplace_back(i);
      n_ -= F[i];
    }
  }
  q(0);
  int p = 3, j = A[0]-1;
  for(auto a : A){
    if(a == A[0]) continue;
    while(j > a){
      q(p);
      p ^= 1;
      --j;
    }
    q(p&1);
  }
  if(y == n){
    swap(x,y);
    for(auto& q : Q)
      q ^= 1;
  }
  cout << Q.size() << endl;
  for(auto e : Q){
    cout << e+1 << '\n';
  }
  cerr << x << " " << y << endl;
  assert(x == n);
}
