#include <algorithm>
#include <bitset>
#include <complex>
#include <deque>
#include <iostream>
#include <istream>
#include <iterator>
#include <map>
#include <queue>
#include <set>
#include <stack>
#include <string>
#include <vector>
#include <tuple>
#include <iomanip>
#include <random>
#include <math.h>
#include <stdio.h>

using namespace std;

using ll = long long;
using vi = vector<int>;
using vvi = vector<vi>;
using pii = pair<int, int>;

void display_2int(vector<vector<int>> vec) {
    int N = vec.size();
    for (int i=0; i<N; i++) {
        for (int j=0; j<vec.at(i).size(); j++) {
            cout << vec.at(i).at(j);
            if (j < vec.at(i).size()-1) {
                cout << " ";
            }
        }
        cout << endl;
    }
}

void display_1string(vector<string> strlist) {
    int N = strlist.size();
    for (int i=0; i<N; i++) {
        cout << strlist.at(i) << endl;
    }
}

void display_1int(vector<int> intlist) {
    int N = intlist.size();
    if (N>0){
      for (int i=0; i<N - 1; i++) {
          cout << intlist.at(i) << " ";
      }
      cout << intlist.at(N-1) << endl;
    }else{
      cout << endl;
    }
}

void display_1ll(vector<long long> lllist) {
    long long N = lllist.size();
    if (N>0){
      for (int i=0; i<N - 1; i++) {
          cout << lllist.at(i) << " ";
      }
      cout << lllist.at(N-1) << endl;
    }else{
      cout << endl;
    }
}

void display_2string(vector<vector<string>> vec) {
    int N = vec.size();
    for (int i=0; i<N; i++) {
        for (int j=0; j<vec.at(i).size(); j++) {
            cout << vec.at(i).at(j);
            if (j < vec.at(i).size()-1) {
                cout << " ";
            }
        }
        cout << endl;
    }
}

int lstmax(vector<int> lst){
  int m = lst.at(0);
  int n = lst.size();
  for (int i=0; i<n-1; i++){
    m = max(m, lst.at(i));
  }
  return m;
}

int lstmin(vector<int> lst){
  int m = lst.at(0);
  int n = lst.size();
  for (int i=0; i<n-1; i++){
    m = min(m, lst.at(i));
  }
  return m;
}

int main(){
    string a;
    cin >> a;
    cout << a.at(1) << a.at(2) << a.at(0) << endl;
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
}
#include <bits/stdc++.h>
using namespace std;
using LL = long long;
LL N, fib[100];
vector<int> ans;
int vis[100];
void print() {
    LL x = 0, y = 0;
    for (int i : ans) {
        if (i == 1) x++;
        if (i == 2) y++;
        if (i == 3) x = x + y;
        if (i == 4) y = x + y;
    }
    cerr << x << endl;
}
int main() {
#ifndef ONLINE_JUDGE
    freopen("cpp.in", "r", stdin);
#endif
    fib[0] = fib[1] = 1;
    for (int i = 2; i < 90; i++) fib[i] = fib[i - 1] + fib[i - 2];
    cin >> N;
    for (int i = 89; ~i; i--)
        if (N >= fib[i]) N -= fib[i], vis[i] = 1;
	int lim = 0;
	for (int i = 1; i < 90; i++) if (vis[i]) lim = i;
    for (int i = lim, j = 1; ~i; i--, j++) {
        if (vis[i]) {
            if (i & 1) ans.push_back(2);
            else ans.push_back(1);
        }
        if (j & 1) ans.push_back(4);
        else ans.push_back(3);
    }
    //print();
    printf("%lu\n", ans.size());
    for (int i : ans) printf("%d\n", i);
    return 0;
}