program psck;
var
count, count1 : integer;
p, now, x, x1, sum: real;
begin
readln(x,p);
p:=1+p/100;
count:=0;
now:=0;
x1:=x;
sum:=0;
count1:=0;
while now<3*x do<br>begin
now:=now+x;
x:=x*p;
count:=count+1;
end;
while sum<1000 do<br>begin
sum:=sum+x1;
x1:=x1*p;
count1:=count1+1;
end;
writeln('В три раза больше на ',count,' день');
writeln('Не менее 1000 км за ',count1,' день');
end.