program save; var a:array[0..12]of integer; i,x,p:integer; begin assign(input,'save.in');reset(input); assign(output,'');rewrite(output); for i:=1 to 12 do a[i]:=300; a[0]:=0;p:=0; for i:=1 to 12 do begin readln(x);inc(a[i],a[i-1]);dec(a[i],x); if a[i]<0 then begin writeln('-',i); close(input);close(output);exit; end else {if a[i]>=100 then} begin p:=(a[i]div 100)*100; inc(a[0],p); a[i]:=a[i]-p; end; end; a[0]:=a[0]*6 div 5; writeln(a[0]+a[12]); close(input);close(output); end.