s=set() c=0 for i in range(int(input())): for j in input().split(): if j in s:s^={j};c+=1 else:s|={j} print(c+len(s)//4)