#include <bits/stdc++.h>

using namespace std;

int main()
{
    long long int n,k;
    cin >> n >> k;
    for(int i=0; i<k; i++) {
        if(n%200==0) n/=200;
        else {
            n*=1000;
            n+=200;
        }
    }
    cout << n << endl;
}

//#define _GLIBCXX_DEBUG
#include <bits/stdc++.h>
#include <algorithm>
#define rep(i,n) for(int i=0;i<(n);++i)
#define all(a) (a).begin(),(a).end()
using namespace std;
using Graph = vector<vector<int>>;
typedef long long ll;
//using Graph = vector<vector<pair<ll,ll>>>;
const int mod =1e+9+7;

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

const ll INF=1e18;

int main(){
    ll a,b; cin>>a>>b;
    ll c=a+b;
    if(c>=15&&b>=8)cout<<1<<endl;
    else if(c>=10&&b>=3)cout<<2<<endl;
    else if(c>=3)cout<<3<<endl;
    else cout<<4<<endl;
}







