m,p=[],0 for i in '.'*int(input()): m+=(map(int,input().split())) while len(m)>len(set(m)): for i in set(m): if m.count(i)>1: m.remove(i) m.remove(i) p+=1 print(p+len(m)//4)