N = int(input()) ct = [0] * 10 for _ in range(N): for v in list(map(int, input().split())): ct[v - 1] += 1 powerup = sum([c // 2 for c in ct]) powerup += (sum([c % 2 for c in ct]) // 4) print(powerup)