n=int(input()) s=set() a=map(int,input().split()) for i in range(n): s.add(a) if n==len(s): print(0) else: f=(n-len(s))//2 print(f)