const
N = 8;
var
a: array[1..N] of integer;
i, j, k: integer;
begin
for i := 1 to N do
readln(a[i]);
for i := 1 to N div 4 do
k := 0;
for j := 4 * i - 3 to 4 * i do
k := k + a[j];
k := k div 4;
a[j] := k
end;
writeln(a[i])
end.
const
N = 8;
var
a: array[1..N] of integer;
i, j, k: integer;
begin
for i := 1 to N do
readln(a[i]);
for i := 1 to N div 4 do
begin
k := 0;
for j := 4 * i - 3 to 4 * i do
k := k + a[j];
k := k div 4;
for j := 4 * i - 3 to 4 * i do
a[j] := k
end;
for i := 1 to N do
writeln(a[i])
end.