program slatkisi;

var a,b,c,d,i,j,n:longint;

begin

         readln(a);
         readln(n);

            if n=0 then writeln(a);

            if n=1 then begin
                   b:=a mod 10;
                   c:=a div 10;
                   if b<5 then write(c*10)
                   else write((c*10)+10);
                        end;

            if n=2 then begin
                   b:=a mod 100;
                   c:=a div 100;
                   if b<50 then write(c*100)
                   else write((c*100)+100);
                        end;

            if n=3 then begin
                   b:=a mod 1000;
                   c:=a div 1000;
                   if b<500 then write(c*1000)
                   else write((c*1000)+1000);
                        end;

            if n=4 then begin
                   b:=a mod 10000;
                   c:=a div 10000;
                   if b<5000 then write(c*10000)
                   else write((c*10000)+10000);
                        end;

            if n=5 then begin
                   b:=a mod 100000;
                   c:=a div 100000;
                   if b<50000 then write(c*100000)
                   else write((c*100000)+100000);
                        end;

            if n=6 then begin
                   b:=a mod 1000000;
                   c:=a div 1000000;
                   if b<500000 then write(c*1000000)
                   else write((c*1000000)+1000000);
                        end;

            if n=7 then begin
                   b:=a mod 10000000;
                   c:=a div 10000000;
                   if b<5000000 then write(c*10000000)
                   else write((c*10000000)+10000000);
                        end;

            if n=8 then begin
                   b:=a mod 100000000;
                   c:=a div 100000000;
                   if b<50000000 then write(c*100000000)
                   else write((c*100000000)+100000000);
                        end;

            if n=9 then begin
                   b:=a mod 1000000000;
                   c:=a div 1000000000;
                   if b<500000000 then write(c*1000000000)
                   else write((c*1000000000)+1000000000);
                        end;
end.