#include <bits/stdc++.h>

using namespace std;
typedef long long ll;
typedef pair<ll, ll> p_ll;

template<class T>
void debug(T itr1, T itr2) { auto now = itr1; while(now<itr2) { cout << *now << " "; now++; } cout << endl; }
#define repr(i,from,to) for (ll i=(ll)from; i<(ll)to; i++)
#define all(vec) vec.begin(), vec.end()
#define rep(i,N) repr(i,0,N)
#define per(i,N) for (ll i=(ll)N-1; i>=0; i--)
#define popcount __builtin_popcount

const ll LLINF = pow(2,61)-1;
const ll INF = pow(2,30)-1;

ll gcd(ll a, ll b) { if (a<b) swap(a,b); return b==0 ? a : gcd(b, a%b); }
ll lcm(ll a, ll b) { return a/gcd(a,b)*b; }

void check(vector<ll> result) {
  ll x = 0, y = 0;
  for (auto r: result) {
    if (r==1) x++;
    else if (r==2) y++;
    else if (r==3) x+=y;
    else if (r==4) y+=x;
  }
  cout << x << endl;
}

int main() {
  ll N; cin >> N;

  ll X = 87, tn = N;
  // ll X = 15, tn = N;
  vector<ll> fib(X); rep(i,X)  fib[i] = i<=1 ? 1 : fib[i-1] + fib[i-2]; 
  // debug(all(fib));
  vector<bool> used(X);

  ll top = -1;
  per(i,X) {
    if (tn>=fib[i]) {
      used[i] = true;
      tn -= fib[i];
      if (top==-1) top = i;
    }
  }
  // debug(all(used));
  // cout << top << endl;

  vector<ll> result;
  for (ll i=top; i>0; i--) {
    if (used[i]) result.push_back(i%2==0?1:2);
    result.push_back(i%2==0?4:3);
  }

  cout << result.size() << endl;
  debug(all(result));

  // check(result);
  return 0;
}
#include <iostream>

using namespace std;

typedef long long LL;

LL f[110];
int ans[150], cnt;

void ins(int x) {
    ans[cnt ++] = x;
}
int main() {
    f[0] = f[1] = 1;
    for (int i = 2; ; i ++) {
        f[i] = f[i - 1] + f[i - 2];
        if(f[i] > 1e18) {
            break;
        }
    }
    LL n, tem = 0;
    cin >> n;
    if (tem + f[86] <= n) {
        tem += f[86];
        ins(1);
    }
    for (int i = 1; i <= 86; i ++) {
        if (i & 1)  ins(4);
        else ins(3);
        if (tem + f[86 - i] <= n)  {
            tem += f[86 - i];
            if (i & 1)  ins(2);
            else ins(1);
        }
    }
    cout << cnt << endl;
    for (int i = 0; i < cnt; i ++)  cout << ans[i] << endl ;
}
