n=input() a=[0]*10 for _ in[0]*n: for i in map(int,raw_input().split()): a[i-1]+=1 b=0 for i in range(10): b+=a[i]/2 a[i]&=1 b+=sum(a)/4 print b