program vct;
uses crt;
var
a:array[1..1000] of integer;
i,n,S:integer;
begin
writeln('Moi nhap n = '); readln(n);
for i:=1 to n do
begin
writeln('Moi nhap so a thu i '); readln(a[i]);
end;
S:=0;
for i:=1 to n do
begin
if ((a[i]<0) and (a[i] mod 2 = 0)) then
S:=S+a[i];
end;
write(S); readln;
end.