var i,s:integer;
begin
while i<>-5 do begin
readln(i);
if i mod 2=0 then s:=s+1;
end;
writeln(s);
end.
var i,s:integer;
begin
while i<>-5 do begin
readln(i);
if i mod 2=0 then s:=s+1;
end;
writeln(s);
end.