import collections n = int(input()) itm = [] for i in range(n): itm += (list(map(int, input().split()))) c = collections.Counter(itm) p_1 = sum([ c[i]//2 for i in c if c[i]%2==0 ]) p_2 = sum([ c[i]//2 for i in c if c[i]%2==1 and c[i] !=1 ]) p_3 = sum([ c[i]%2 for i in c if c[i]%2==1 and c[i] !=1 ]) p_4 = sum([ c[i] for i in c if c[i]==1 ]) p_5 = (p_3 + p_4)//4 print(p_1 + p_2 + p_5)