var i,k:byte;
begin
i:=1;
while i<>0 do begin
readln(i);
if (i<>0) and (i mod 2=0) then inc(k);
end;
writeln(k);
end.
var i,k:byte;
begin
i:=1;
while i<>0 do begin
readln(i);
if (i<>0) and (i mod 2=0) then inc(k);
end;
writeln(k);
end.