i = set(); c = 0 for _ in range(int(input())): j = sorted([int(e) for e in input().split()]) for e in j: if e in i: i.remove(e); c+=1 else: i.add(e) print(c+len(i)//4)