N=int(input()) A=list(map(int,input().split())) A=sorted(A) c=0 for i in range(N-1): if A[i]==A[i+1]: c+=1 A[i]=-1 A[i+1]=-1 print(c)