N=int(input()) L=[] A,B=0,0 for i in range(N):L+=input().split() for i in range(1,11): C=L.count(str(i)) A+=int(C/2) B+=C%2 print(A+int(B/4))