n = int(input()) l = [0] * 11 for i in range(n): for j in map(int,input().split()): l[j] += 1 res = 0 rem = 0 for i in l: res += i // 2 rem += i % 2 res += rem // 4 print(res)