program chanle;
var
tl,tc,i,n,x:integer;
begin
write(' nhap n so nguyen: ');
readln(n);
for i:= 1 to n do
begin
read(x);
if x mod 2 = 0 then
tc:=tc+x;
if x mod 2 <> 0 then
tl:=tl+x;
end;
writeln(' tong cac so chan la: ',tc);
write('tong cac so le la: ',tl);
readln;
end.