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

int main() {
  unsigned long long N,K;
  cin >> N >> K;
  for(int i=0;i<K;i++){
    if((N%200)==0){
      N = N/200;
    }else{
      N = N*1000+200;
    }
  }
  cout << N << endl;
}
#include<bits/stdc++.h>
using namespace std;

int S(int n){
  int ret = 0;
  while(n>0){
    ret += n%10;
    n /= 10;
  }
  return ret;
}

int main(){
  int a,b;
  cin >> a >> b;
  int Sa = S(a);
  int Sb = S(b);
  if(Sa > Sb)
    cout << Sa  << endl;
  else
    cout << Sb << endl;
  return 0;
}