var  z,c,s,k,n,h:longint;
begin

 readln(c);
 readln(k);

 if (k=0) then s:=1;
 if (k=1) then s:=10;
 if (k=2) then s:=100;
 if (k=3) then s:=1000;
 if (k=4) then s:=10000;
 if (k=5) then s:=100000;
 if (k=6) then s:=1000000;
 if (k=7) then s:=10000000;
 if (k=8) then s:=100000000;
 if (k=9) then s:=1000000000;

 if (c<s) then begin
 z:=s;
 end;

 if (k=0) then begin
 z:=c;
 end;

 if (k=1) then begin
 h:=(c mod s);
 if (h<5) then z:=c-h;
 if (h>=5) then z:=c-h+10;
 end;

 if (k=2) then begin
 h:=(c mod s);
 if (h<50) then z:=c-h;
 if (h>=50) then z:=c-h+100;
 end;

 if (k=3) then begin
 h:=(c mod s);
 if (h<500) then z:=c-h;
 if (h>=500) then z:=c-h+1000;
 end;

 if (k=4) then begin
 h:=(c mod s);
 if (h<5000) then z:=c-h;
 if (h>=5000) then z:=c-h+10000;
 end;

 if (k=5) then begin
 h:=(c mod s);
 if (h<50000) then z:=c-h;
 if (h>=50000) then z:=c-h+100000;
 end;

 if (k=6) then begin
 h:=(c mod s);
 if (h<500000) then z:=c-h;
 if (h>=500000) then z:=c-h+1000000;
 end;

 if (k=7) then begin
 h:=(c mod s);
 if (h<5000000) then z:=c-h;
 if (h>=5000000) then z:=c-h+10000000;
 end;

 if (k=8) then begin
 h:=(c mod s);
 if (h<50000000) then z:=c-h;
 if (h>=50000000) then z:=c-h+100000000;
 end;

 if (k=9) then begin
 h:=(c mod s);
 if (h<500000000) then z:=c-h;
 if (h>=500000000) then z:=c-h+1000000000;
 end;



writeln(z);
end.

