#include <iostream>
using namespace std;

int main ()

{
    int c,k;
    cin>>c>>k;
    for(int i=0;i<=k;i++)
    {int k=1;
        for(int a=0;a<i;a++)
        {
            k=k*10;}
            if((c%k)>=5*k/10)
            c=c-c%k+k;
            if((c%k)<5*k/10)
            c=c-c%k;
        }
        
        cout<<c;
        //system("pause");
        return 0;}
            
