n = int(input()) d = {} pup = 0 item = 0 for x in range(1, 11): d[x] = 0 for _ in range(n): a = [int(x) for x in input().split()] for b in a: d[b] = d[b] + 1 for k in d.keys(): if d[k] >=2: pup += d[k]//2 item += (d[k] % 2) print(pup + item //4)