var c,k,o,s2,a1,a2,s,i:integer;

begin
     readln(c);
     readln(k);
     s:=1;
     for i:=1 to k do
         s:=s*10;
     s2:=s div 2;
     o:=c mod s;
     if o<s2 then a1:=c-o;
     if o>=s2 then
     begin
     a2:=c-o;
     a1:=a2+s;
     end;
     if c<s then a1:=s;
     writeln(a1);
end.

