program ime;
var a,b,s,d,t:longint;
begin
readln(a);
readln(b);
s:=(a mod 10);
if (s < 5) and (b = 1) then writeln (a - s)
else if (s>4) and (b= 1) then writeln (a+(10-s));
d:=a mod 100;
t:=a div 100;

if (d< 50) and (b= 2) then writeln (t*100)
else if (d>49) and (b=2) then writeln(t*100+100);

if (a<= 1000) and (b=3) then writeln(1000)
else if (d< 50) and (b= 3)  then writeln (t*100)
else if (d>49) and (b=3)  then writeln(100*(b+1));

if (a>999) and (a<10000) and (b=4) then writeln(10000)
else if (d< 50) and (b= 4)  then writeln (t*100)
else if (d>49) and (b=4)  then writeln(100*(b+2));

if (a>9999) and (a<100000) and (b=5) then writeln(100000)
else if (d< 50) and (b= 5)  then writeln (t*100)
else if (d>49) and (b=5)  then writeln(100*(b+3));

if (a>99999) and (a<1000000) and (b=6) then writeln(1000000)
else if (d< 50) and (b= 6)  then writeln (t*100)
else if (d>49) and (b=6)  then writeln(100*(b+4));

if (a>999999) and (a<10000000) and (b=7) then writeln(10000000)
else if (d< 50) and (b= 7)  then writeln (t*100)
else if (d>49) and (b=7)  then writeln(100*(b+5));

if (a>9999999) and (a<100000000) and (b=8) then writeln(100000000)
else if (d< 50) and (b= 8)  then writeln (t*100)
else if (d>49) and (b=8)  then writeln(100*(b+6));

if (a>99999999) and (a<1000000000) and (b=9) then writeln(1000000000)
else if (d< 50) and (b= 9)  then writeln (t*100)
else if (d>49) and (b=9)  then writeln(100*(b+7));
readln;
end.
