refer
program dem;
uses crt;
var n,i,j,S: integer;
a:array[1..100] of integer;
begin
i:=0;
S:=0;
while(readln(n)) do
begin
if(n:=0) then break;
i:=i+1;
a[i]:=n;
end;
for j:=1 to i do
begin
if(a[j] mod 2 <> 0) then S:=S+a[j];
end;
write(‘Tong cua cac so le la: ‘,S);
readln;