function f(a: array of integer): byte;
begin
foreach i: integer in a do
if (i mod 2 = 1) then
result += 1;
end;
begin
var a: array of integer := new integer[50];
for var i := 0 to 49 do
begin
a[i] := random(1, 300000);
write(a[i], ' ');
end;
writeln(#13, #13, f(a));
end.