uses crt;
var x,n,i,t:integer;
begin
clrscr;
readln(n);
t:=0;
for i:=1 to n do
begin
readln(x);
if x mod 2=0 then t:=t+x;
end;
writeln(t);
readln;
end.
program ideone;
var i,n,x,res:longint;
begin
readln(n);
res:=0;
for i:=1 to n do
begin
read(x);
if x mod 2 = 0 then
res:=res+x;
end;
write(res);
end.