N = input() items = {} for i in range(N): a = map(int,raw_input().split()) for aa in a: if items.has_key(aa): items[aa] += 1 else: items[aa] = 1 ans = 0 for key in items.keys(): if items[key] >= 2: ans += items[key] / 2 items[key] -= (items[key] / 2) * 2 del items[key] ans += len(items)/4 print ans