import math N = int(input()) li = [] match = 0 other = 0 for i in range(N): l = list(map(int, input().split())) li.extend(l) for i in range(1,11): count = li.count(i) match += count / 2 other += count % 2 print(math.floor(match) + math.floor(other / 4))