N = int(input()) K = [] for i in range(N): K += list(map(int, input().split())) K.sort() t = 0 s = 0 for i in range(1, 11): j = K.count(i) t += j // 2 s += j % 2 print(t + (s // 4))