import java.util.Scanner; public class Main { public static void main(String[] a) { Scanner s=new Scanner(System.in); s.nextInt(); int[] I=new int[11]; int U=0,D=0,i; while(s.hasNext()){ if(I[i=s.nextInt()]<0)U++;else D++; I[i]=~I[i]; } System.out.println(U+(D-U)/4); } }