N = int(input()) A = list(map(int,input().split())) C = [0 for i in range(N + 1)] for a in A: C[a] += 1 ans = 0 for c in C: ans += c // 2 print(ans)