var
a, b, c, d, k: longint;
begin
read(a, b, c, d);
k := 0;
if a mod 2 = 0 then k := k + 1;
if b mod 2 = 0 then k := k + 1;
if c mod 2 = 0 then k := k + 1;
if d mod 2 = 0 then k := k + 1;
writeln(k);
end.
var
a, b, c, d, k: longint;
begin
read(a, b, c, d);
k := 0;
if a mod 2 = 0 then k := k + 1;
if b mod 2 = 0 then k := k + 1;
if c mod 2 = 0 then k := k + 1;
if d mod 2 = 0 then k := k + 1;
writeln(k);
end.