from collections import Counter c = Counter() for _ in range(int(input())): c += Counter(input().split()) cnt = 0 for k, v in c.items(): cnt += v // 2 c[k] %= 2 print(cnt + sum(c.values()) // 4)