uses crt;
var a:array[1..500]of integer;
i,n,t:integer;
{----------------------chuong-trinh-con------------------------}
function kiem_tra(x:integer):boolean;
begin
if x mod 2<>0 then kiem_tra:=true
else kiem_tra:=false;
end;
{----------------------chuong-trinh-chinh----------------------}
begin
clrscr;
repeat
write('Nhap n='); readln(n);
until (0<n) and (n<=500);
for i:=1 to n do
begin
repeat
write('A[',i,']='); readln(a[i]);
until a[i]>0;
end;
t:=0;
for i:=1 to n do
if kiem_tra(a[i])=true then t:=t+a[i];
writeln('Tong cac so le la: ',t);
readln;
end.