Program bi;
type tab=array[1..100,1..100] of integer;
var n,m,i,j,s:integer;
t:tab;
begin
readln(n);
readln(m);
for i:=1 to n do
for j:=1 to m do
readln(t[i][j]);
for i:=1 to n do
for j:=1 to m do
if(t[i][j] mod 2=0) then S:=S+t[i][j];
writeln('Mассив:');
for i:=1 to n do begin
writeln;
for j:=1 to m do
write(t[i][j],' ');
end;
writeln('сумма чётныч чисел ',S);
end.