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

using namespace std;
typedef long long ll;
typedef pair<ll, ll> P;
ll mod = 1000000007;
ll mod2 = 998244353;

int main() {
	string n;
	ll k;
	cin >> n >> k;
	for (int i = 0; i < k; i++) {
		ll index = 1;
		ll ans = 0;
		for (int j = n.size() - 1; j >= 0; j--) {
			ans += (n[j] - '0') * index;
			index *= 10;
		}
		
		if (ans % 200 == 0) {
			ans /= 200;
			n = to_string(ans);
		}
		else {
			n += "200";
		}
	}
	ll ans2 = 0;
	ll index = 1;
	for (int j = n.size() - 1; j >= 0; j--) {
		ans2 += (n[j] - '0') * index;
		index *= 10;
	}
	cout << ans2 << endl;
	return 0;
}




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

int main(){
	ll n,k;
	cin>>n>>k;
	while(k){
		if(n%200==0)
			n/=200;
		
		
		else
			n=n*1000+200;
		
		k--;	
		
	}
	cout<<n<<endl;
	return 0;
}
