var a:array[1..8]of integer;
i,s:integer;
begin
for i:=1 to 8 do begin
readln(a[i]);
if i mod 2 = 0 then s:=s+a[i];
end;
writeln(s/4);
end.
var a:array[1..8]of integer;
i,s:integer;
begin
for i:=1 to 8 do begin
readln(a[i]);
if i mod 2 = 0 then s:=s+a[i];
end;
writeln(s/4);
end.