import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines N,*A = map(int,read().split()) counter = [0] * (101) for x in A: counter[x] += 1 answer = 0 rest = 0 for x in counter: q,r = divmod(x,2) answer += q rest += r answer += rest // 4 print(answer)