import sys i=sys.stdin.read().split()[1:] a=[] b=0 for j in i: if j in a: b+=4 a.remove(j) else:a+=[j] print((b+len(a))//4)