#include<cstdio>
#include<algorithm>
#include<vector>
#define ll long long
#define M 88

ll n;

ll f[M];

int m,g[M];

std::vector<int> ans;

int main(){
	f[1]=f[2]=1;
	for(int i=3;i<M;i++)
		f[i]=f[i-1]+f[i-2];
	scanf("%lld",&n);
	for(int i=M-1;i;i--)
		if(n>=f[i]){
			if(!m)
				m=i;
			g[i]=n/f[i];
			n%=f[i];
		}
	for(int i=1;i<m;i++){
		while(g[m-i+1]--)
			ans.push_back((i&1)^(m&1)?2:1);
		ans.push_back((i&1)^(m&1)?3:4);
	}
	printf("%d\n",ans.size());
	for(auto i:ans)
		printf("%d\n",i);
}
#include <iostream>
#include <vector>

using ll = long long;


int const sigma = 86;
//int const sigma = 6;
ll fib[1 + sigma];
int seen[1 + sigma];

ll eval(std::vector<int> sol) {
  ll x = 0, y = 0;

  for(int i = 0; i < sol.size(); i++) {
    int op = sol[i];
    if(op == 1)
      x++;
    else if(op == 2)
      y++;
    else if(op == 3)
      x += y;
    else
      y += x;
  }
  return x;
}
int main() {
  ll n;
  std::cin >> n;
  fib[0] = fib[1] = 1;
  for(int i = 2; i <= sigma; i++)
    fib[i] = fib[i - 2] + fib[i - 1];
  for(int i = sigma; 0 <= i; i--)
    if(fib[i] <= n) {
      n -= fib[i];
      seen[i] = 1;
    }
  int op = 3;
  std::vector<int> sol;
  for(int i = sigma; 0 <= i; i--) {
    if(seen[i] == 1)
      sol.push_back(op - 2);
    sol.push_back(op);
    op = 7 - op;
  }
  
  std::cout << sol.size() << '\n';
  for(int i = 0; i < sol.size(); i++)
    std::cout << sol[i] << '\n';
  return 0;
}
