program taxi;
var i,n:integer;
s:array[1..100] of integer;
t:longint;
f,g:text;
begin
assign(f,'BAI3.INP');reset(f);
readln(f,n);
for i:=1 to n do
read(f,s[i]);
close(f);
assign(g,'BAI3.OUT');rewrite(g);
for i:=1 to n do
t:=t+s[i];
if t mod 4=0 then writeln(g,(t div 4));
if t mod 4<>0 then writeln(g,((t div 4)+1));
close(g);
end.