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

set<string> st;

void solve1()
{
	vector<string> print;
	string s;
	int cnt = 0;
	for (auto iter = st.begin(); iter != st.end(); iter++) {
		s += *iter;
		if (cnt == 20) break;
		if (s.length() > 18) {
			while (s.length() > 20) {
				s.pop_back();
			}
			print.push_back(s);
			cnt++;
			s = "";
		}
	}
	
	for (auto iter = print.begin(); iter != print.end(); iter++) {
		cout << *iter;
		for (int i = 0; i < 20 - (*iter).length(); i++) {
			cout << ".";
		}
		cout << endl;
	}
}

void solve2()
{
	string print[20];
	int h = 0;
	for (auto iter = st.begin(); iter != st.end(); iter++) {
		print[h % 20] += *iter;
		h++;
	}
	for (int h = 0; h < 20; h++) {
		for (int w = 0; w < 20; w++) {
			cout << print[h][w];
		}
		cout << endl;
	}
}

bool seen[20][20];
string M[20];

int dy[4] = {0,1,0,-1};
int dx[4] = {1,0,-1,0};

bool comp(const std::string& lh, const std::string& rh) {
     
    return lh.length() < rh.length();
}
 
class Comp {
public:
    bool operator() (const std::string& lh, const std::string& rh) {
 
        return lh.length() < rh.length();
    }
};

int main()
{
	int n,m;
	cin >> n >> m;
	vector<string> s;
	for (int i = 0; i < m; i++) {
		string t;
		cin >> t;
		//s.push_back(t);
		st.emplace(t);
	}

	solve1();
	//solve2();
}
#include<iostream>
#include<string.h>
#include<string>
#include<stdio.h>
#include<algorithm>
#include<vector>
#include<bitset>
#include<math.h>
#include<stack>
#include<queue>
#include<set>
#include<map>
using namespace std;
typedef long long ll;
typedef long double db;
typedef unsigned long long ull;
typedef vector<int> vi;
typedef pair<int,int> pii;
const int N=100000+100;
const db pi=acos(-1.0);
#define lowbit(x) ((x)&(-x))
#define sqr(x) (x)*(x)
#define rep(i,a,b) for (register int i=a;i<=b;i++)
#define per(i,a,b) for (register int i=a;i>=b;i--)
#define go(u,i) for (register int i=head[u],v=sq[i].to;i;i=sq[i].nxt,v=sq[i].to)
#define fir first
#define sec second
#define mkp make_pair
#define pb push_back
#define maxd 998244353
#define eps 1e-8
inline int read()
{
    int x=0,f=1;char ch=getchar();
    while ((ch<'0') || (ch>'9')) {if (ch=='-') f=-1;ch=getchar();}
    while ((ch>='0') && (ch<='9')) {x=x*10+(ch-'0');ch=getchar();}
    return x*f;
}

inline ll readll()
{
    ll x=0;int f=1;char ch=getchar();
    while ((ch<'0') || (ch>'9')) {if (ch=='-') f=-1;ch=getchar();}
    while ((ch>='0') && (ch<='9')) {x=x*10+(ch-'0');ch=getchar();}
    return x*f;
}

ll f[110],n;
int m;
vi ans,a;

int main()
{
    f[0]=1;f[1]=1;m=88;
    rep(i,2,m) f[i]=f[i-2]+f[i-1];
    //rep(i,1,10) cout << f[i] << " ";cout << endl;
    n=readll();
    per(i,m,1)
    {
        if (n>=f[i]) {n-=f[i];a.pb(i);}
    }
    int siz=a.size();
    int len=(a[0]+1)/2,pos=siz-1;
    //rep(i,0,siz-1) printf("%d ",a[i]);puts("");
    rep(i,1,len)
    {
        ans.pb(3);ans.pb(4);
        while ((pos>=0) && ((a[pos]+1)/2==i))
        {
            if (a[pos]&1) ans.pb(2);else ans.pb(1);pos--;
        }
    }
    len=ans.size();
    printf("%d\n",len);
    per(i,len-1,0) printf("%d\n",ans[i]);
    return 0;
}
