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 and i % 2 == 0: c += i//2 elif i > 1 and i % 2 == 1: c += i//2 l.append(1) c1 = l.count(1) c += c1 // 4 print(c)