import collections N = int(input()) a = sum([list(map(int, input().split())) for _ in range(N)], []) cnt = collections.Counter(a).values() pair, rest = [sum(t) for t in list(zip(*[divmod(i, 2) for i in cnt]))] print(pair + rest // 4)