import collections N=int(input()) c=collections.Counter() for i in range(N): c.update(map(int, input().split())) ans=0 for v in c.values(): ans += v // 2 ans += (sum(c.values())-2*ans) // 4 print(ans)