cnt=[];chk1=chk2=0 x=sum([[*map(int,input().split())] for _ in range(int(input()))],[]) for i in set(x): cnt.append(x.count(i)) for i in cnt: while i>=2: chk1+=1 i-=2 if i==1: chk2+=1 print(chk1+chk2//4)