L = [0 for i in range(11)] A = 0 for i in range(int(input())): I = list(map(int, input().split())) for j in I: L[j] += 1 if L[j] > 1: L[j] = 0 A += 1 print(A + sum(L)//4)