program TongSoChan;
var
n, i, x, tong: integer;
begin
write('Nhap so nguyen n: ');
readln(n);
tong := 0;
for i := 1 to n do
begin
read(x);
if x mod 2 = 0 then
tong := tong + x;
end;
writeln('Tong cac so chan la: ', tong);
readln;
end.