var
a:array[1..12]of longint;
i,s,k:longint;
begin
s:=0;
for i:=1 to 12 do
readln(a[i]);
for i:=1 to 12 do
begin
s:=s+300;
s:=s-a[i];
if s<0 then
begin
writeln('-',i);
halt;
end
else
begin
k:=s div 100*100;
s:=s mod 100;
end;
end;
writeln(s+k+k*0.2:0:0);
end.