program tong_chan;
uses crt;
var A:array[1..1000] of integer;
n,i,t:integer;
begin
clrscr;
write('Nhap n: '); readln(n);
t:=0;
for i:=1 to n do
begin
write('Nhap so thu ',i,': '); readln(A[i]);
if A[i] mod 2=0 then t:=t+A[i];
end;
write('Tong cac gia tri la so chan la: ',t);
readln;
end.