program cc(input,output);
var
a:array[1..12] of integer;
s,m,i:integer;
begin
assign(input,'save.in');
assign(output,'save.out');
reset(input);
rewrite(output);
for i:=1 to 12 do
read(a[i]);
for i:=1 to 12 do
begin
s:=s+300;
s:=s-a[i];
if s<0 then
begin
write('-',i);
close(output);
exit;
end
else
begin
m:=m+(s div 100)*100;
s:=s-(s div 100)*100;
end;
end;
writeln(m*1.2+s:0:0);
close(output);
end.