n=int(input()) a=list(map(int,input().split())) c=[0]*n for v in a: c[v-1]+=1 print(sum(v//2 for v in c))