program carz;
var
i,j,s,t:longint;
f:array[0..1000]of real;
ans:real;
begin
assign (input,'carz.in');
reset (input);
assign (output,'carz.out');
rewrite (output);
readln (s,t);
f[0]:=0;
for i:=1 to s div 10 do
f[i]:=maxlongint;
for i:=1 to s div 10 do
for j:=0 to i-1 do
begin
if i-j=1 then
begin
if f[j]+0.1+t/60<f[i] then
f[i]:=f[j]+0.1+t/60
end;
if i-j=2 then
begin
if f[j]+20/90+t/60<f[i] then
f[i]:=f[j]+20/90+t/60
end;
if i-j=3 then
begin
if f[j]+30/80+t/60<f[i] then
f[i]:=f[j]+30/80+t/60
end;
if i-j=4 then
begin
if f[j]+40/75+t/60<f[i] then
f[i]:=f[j]+40/75+t/60
end;
if i-j>4 then
begin
if f[j]+(i-j)*10/70+t/60<f[i] then
f[i]:=f[j]+(i-j)*10/70+t/60
end
end;
ans:=f[s div 10];
ans:=ans-t/60;
writeln (ans:0:2);
close (input);
close (output)
end.