#include<cstdio>
#include<algorithm>

using namespace std;
int main()
{
  int c,k,x,z=1;
  scanf("%d %d",&c,&k);
  if(k==0)printf("%d\n",c);
  else
  {
  for(x=0;x<k;x++)
  z*=10;
  if(c%z<z/2)c=c-c%z;
  else c+=z-c%z;

  

  
  
  
  
  printf("%d\n",c);
  }
 
  return 0;
}
  
  
