Program chik; var n,a,k,i:integer; begin read(n); k:=0; for i:=1 to n do begin read(a); if(a=2)then k:=k+1; end; writeln(k); end.