N = input() myitem = [0] * 10 for n in xrange(N): items = map(int, raw_input().split()) for item in items: myitem[item-1] +=1 up = 0 up += sum([item/2 for item in myitem]) up += sum([item%2 for item in myitem])/4 print up