var
a : array [1..1000] of longint;
i,n,sum : longint;
begin
Read(n);
for i:=1 to n do Read(a[i]);
sum:=0;
for i:= 1 to n do
if (a[i] mod 2 = 0) and (a[i]<50)
then sum:=sum+a[I];
Writeln(sum);
end.
var
a : array [1..1000] of longint;
i,n,sum : longint;
begin
Read(n);
for i:=1 to n do Read(a[i]);
sum:=0;
for i:= 1 to n do
if (a[i] mod 2 = 0) and (a[i]<50)
then sum:=sum+a[I];
Writeln(sum);
end.