Var a:array[1..100] of integer;
i,n:integer;
s:longint;
Begin
Repeat
Write('n = ');readln(n);
Until (n>0) and (n<=100);
For i:=1 to n do
Begin
Write('Nhap phan tu thu ',i);readln(a[i]);
If a[i] mod 2 = 0 then s:=s+a[i];
End;
Write('Tong cac so chan la ',s);
Readln
End.