n = int(input()) count = 0; lst = [] for i in range(n): lst2 = list(map(int, input().split())) for j in lst2: if j in lst: count += 1 lst.remove(j) else: lst.append(j) print(count + len(lst) // 4)