program hanibal;
var a , b , c, x : longint;
begin
     c := 1;
     readln( a );
     readln( b );
     for x := 1 to b do
         begin
              c := c * 10;
         end;
     if ( a mod c ) >= ( c div 2 ) then writeln ( a + ( c - ( a mod c ) ) );
     if ( a mod c ) < ( c div 2 ) then writeln ( a - a mod c );
     if a mod c = 0 then writeln ( a );
     readln;
end.
