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