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