program tinh_tong;
uses crt;
var i,n,t:integer;
a:array[1..100]of integer;
begin
clrscr;
write('nhap n:');readln(n);
for i:=1 to n do
begin
write('a[',i,']=');readln(a[i]);
end;
t:=0;
for i:=1 to n do
t:=t+a[i];
writeln('tong cua day la: ',t);
t:=0;
for i:=1 to n do
if a[i] mod 2=0 then t:=t+a[i];
writeln('tong cac so chan la: ',t);
readln;
end.