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

ll n, f[1005];
int flg[1005];
vector<int> vec;

#define pb push_back

template < typename T >
inline T read()
{
	T x = 0, w = 1; char c = getchar();
	while(c < '0' || c > '9') { if(c == '-') w = -1; c = getchar(); }
	while(c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
	return x * w;
}

int main()
{
#ifndef ONLINE_JUDGE
	//freopen("cpp.in", "r", stdin);
#endif
	n = read <ll> ();
	f[0] = 0, f[1] = 1;
	for(int i = 2; i <= 88; i++) f[i] = f[i - 1] + f[i - 2];
	ll tmp = n; int pos = 0;
	for(int i = 87; i >= 1; i--) if(tmp >= f[i]) flg[i] = 1, tmp -= f[i];
	for(int i = 1; i <= 87; i++) if(flg[i]) pos = i;
	for(int i = pos, j = 1; i >= 1; j++, i--)
	{
		if(flg[i])
		{
			if(i & 1) vec.pb(1);
			else vec.pb(2);
		}
		if(j & 1) vec.pb(4);
		else vec.pb(3);
	}
	printf("%lu\n", vec.size());
	for(auto i : vec) printf("%d\n", i);
	return 0;
}

#include <bits/stdc++.h> 

using namespace std;

typedef long double ld;
typedef long long ll;
const int MAXN = 100005;
const ll MOD = 1e9+7;


ll fib[MAXN];
int cnt[MAXN];

inline void solve()
{
	ll n;	cin >> n;
	fib[1] = 1;
	int tk = 0;
	for (int i=2;;i++)
	{
		fib[i] = fib[i-1] + fib[i-2];
		if (fib[i] > n)
		{
			tk = i - 1;
			break;	
		}
	}
	
//	cout << tk << ": " << fib[tk] << "\n";
	int len = tk;
	
	ll sum = n - fib[tk];
	while (sum)
	{
		int id = upper_bound(fib+1,fib+tk+1,sum) - fib - 1;
		int t = tk - id + 1;
		cnt[t]++;
		len++;
		sum -= fib[id];
	}
	cout << len << "\n";
	
	int l = 3,r = 4;

	if (tk%2==0)
		swap(l,r);
		
	for (int i=1;i<=tk;i++)
	{
		if (i&1)
		{
			if (i == 1)
			{
				if (tk&1)
					cout << 1 << "\n";
				else 
					cout << 2 << "\n";
			}
			else 
			{
				cout << l << "\n";
				for (int j=1;j<=cnt[i];j++)
					cout << ( (tk&1) ? 1 : 2 ) << "\n"; 
			}
		}
		else
		{ 
			cout << r << "\n";
			for (int j=1;j<=cnt[i];j++)
				cout << ( (tk&1) ? 2 : 1 ) << "\n"; 
		}
	}
	
	
}

int main()
{
	solve();	
	return 0;
}