program Tinhtong;
uses crt;
var a:array[1..100] of integer;
sum,n:integer;
begin clrscr;
write('Nhap n = '); readln(n);
for i:=1 to n do
begin
write('a[',i,'] = '); readln(a[i]);
end;
sum:=0;
for i:=1 to n do
if (a[i] mod 2 = 0) then sum:=sum+a[i];
write('Tong cac so chan = ',sum);
readln;
end.