from collections import Counter N = int(input()) C = Counter() for _ in range(N): C.update({v: 1 for v in list(map(int, input().split()))}) ans = 0 c = 0 for v in C.values(): ans += v//2 c += v&1 print(ans+c//4)