uses crt;
var a:array[1..2,1..5]of integer;
i,j,t:integer;
begin
clrscr;
for i:=1 to 2 do
for j:=1 to 5 do
begin
write('A[',i,',',j,']='); readln(a[i,j]);
end;
t:=0;
for i:=1 to 2 do
for j:=1 to 5 do
if a[i] mod 2=0 then t:=t+a[i];
writeln(t);
readln;
end.