# coding: utf-8 n = int(input()) table = {} count = 0 for i in range(n): l = list(map(int,input().split(" "))) for j in l: if j not in table: table[j] = 1 else: table[j] += 1 if table[j] == 2: count += 1 table[j] = 0 print(count + sum(table.values()) // 4)