#include <iostream>
#include <string>
#include <vector>
#include <deque>
#include <queue>
#include <algorithm>
#include <iomanip>
#include <set>
#include <map>
#include <bitset>
#include <cmath>
#include <functional>

using namespace std;

#define REP(i,n) for(ll (i) = (0);(i) < (n);++i)
#define REV(i,n) for(ll (i) = (n) - 1;(i) >= 0;--i)
#define SHOW1d(v,n) {REP(W,n)cerr << v[W] << ' ';cerr << endl << endl;}
#define SHOW2d(v,i,j) {REP(aaa,i){REP(bbb,j)cerr << v[aaa][bbb] << ' ';cerr << endl;}cerr << endl;}
#define PB push_back
#define EB emplace_back
#define MP make_pair
#define FI first
#define SE second
#define ALL(v) v.begin(),v.end()
#define Decimal fixed<<setprecision(20)
#define INF 1000000000
#define LLINF 1000000000000000000LL
#define MOD 1000000007LL

typedef long long ll;
typedef pair<ll,ll> P;

template<typename T>
void show_vector(vector<T> v) {
	for (auto ele: v)cout << ele << " " ;cout << endl;
}

template<typename T>
void show_vector(vector<vector<T>> v) {
	for (auto ele: v)show_vector(ele);
}

template<typename T>
void show_vector(vector<vector<vector<T>>> v) {
	for (auto ele: v) {
		show_vector(ele);
		cout << endl;
	}
}

int main(){
	cin.tie(0);cout.tie(0);ios::sync_with_stdio(false);

	vector<ll> fib(88);
	fib[0] = 0;
	fib[1] = 1;
	for (ll i = 2;i < fib.size();i++) {
		fib[i] = fib[i-1] + fib[i-2];
	}

	ll n;cin >> n;
	vector<ll> v(2);
	vector<ll> ans;
	REP(i, fib.size() - 1) {
		if (n >= fib[fib.size() - 1 - i]) {
			n -= fib[fib.size() - 1 - i];
			v[i%2]++;
			ans.PB(i % 2);
		}
		v[(i+1)%2] += v[i%2];
		ans.PB(2 + (1 - (i % 2)));
		//cout << v[0] << " " << v[1] << endl;
	}

	cout << ans.size() << endl;
	REP(i, ans.size()) {
		cout << ans[i]+1 << endl;
	}

	// cout << "ans: " << v[0] << endl;

	return 0;
}

#include <bits/stdc++.h>
#include <cstdlib>
#include <pthread.h>
#include <sstream>
#include <string>

using namespace std;
#define mem1(a) memset(a,-1,sizeof(a))
#define mem0(a) memset(a,0,sizeof(a))
#define ln "\n"
#define ll long long int
#define Mod 1000000007
#define lld long double

template<typename T_vector>
void output_vector(const T_vector &v, bool add_one = false, int start = -1, int end = -1) {
	if (start < 0) start = 0;
	if (end < 0) end = int(v.size());

	for (int i = start; i < end; i++)
		cout << v[i] + (add_one ? 1 : 0) << (i < end - 1 ? ' ' : '\n');
}

ll sttoll(string s)
{
	stringstream hel(s);
	ll x = 0;
	hel >> x;
	return x;
}

string lltostr(ll x)
{
	string s;
	s = to_string(x);
	return s;
}


void solve(int tc) {
	ll n, k; cin >> n >> k;
	ll b = n;
	while (k > 0)
	{
		if (b % 200 == 0) b /= 200;
		else {
			string t = lltostr(b);
			t += "200";
			b = sttoll(t);
		}
		k--;
	}
	cout << b << ln;
}

int main()
{
	ios_base::sync_with_stdio(false); cin.tie(NULL); cout.tie(NULL);
	cout << setprecision(15) << fixed;
	ll t = 1;
	// cin >> t;
	for (ll i = 0; i < t; i++)
	{
		solve(i);
	}
	return 0;
}