n = int(input()) l = [list(map(int, input().split())) for _ in range(n)] d = {} for i in l: for j in i: if not j in d: d[j] = 1 else: d[j] += 1 l = list(d.values()) c = 0 for i in l: if i > 1: c += i//2 c1 = l.count(1) c += c1 // 4 print(c)