program carz;
const
maxtin=1000000;
var
i,j,s:longint;
min,t:real;
f,v:array[0..1000]of real;
procedure init;
begin
assign(input,'carz.in');
reset(input);
assign(output,'carz.out');
rewrite(output);
read(s,t);
s:=s div 10;
for i:=0 to s do
begin
if i<=1 then v[i]:=10
else if i<=2 then v[i]:=9
else if i<=3 then v[i]:=8
else if i<=4 then v[i]:=7.5
else if i<=s then v[i]:=7
end;
for i:=1 to s do
f[i]:=maxtin;
t:=t/60
end;
procedure dp;
begin
for i:=1 to s do
for j:=1 to i do
if i-j>=0 then
if f[i]>f[i-j]+t+j/v[j] then
f[i]:=f[i-j]+t+j/v[j]
end;
procedure print;
begin
min:=f[s]-t;
writeln(min:0:2);
close(input);
close(output)
end;
begin
init;
dp;
print
end.