from collections import Counter lst=[] cnt1=0 cnt2=0 n = int(input()) for i in range(n): lst += list(map(int, input().split())) count = sorted(Counter(lst).values(), reverse=1) for c in count: if c>1: cnt1 += c//2 cnt2 += c%2 if c==1: cnt2 += 1 point = cnt1 * 1 + cnt2 // 4 print(point)