var x,i,n:integer;
var a:array[1..99999] of integer;
begin
readln(n);
x:=0;
for i:=1 to n do begin
readln(a[i]);
end;
if (a[i]=2) or (a[i]=4) then
inc(x);
writeln(x);
end.
var x,i,n:integer;
var a:array[1..99999] of integer;
begin
readln(n);
x:=0;
for i:=1 to n do begin
readln(a[i]);
end;
for i:=1 to n do begin
if (a[i]=2) or (a[i]=4) then
inc(x);
end;
writeln(x);
end.