n = io.read() item = {} for i= 1, n do for c in string.gmatch(io.read(),"%d+") do item[c-0] = (item[c-0] or 0) + 1 end end pup = 0 rest = 0 for k, v in pairs(item) do rest = rest + (v % 2) pup = pup + math.floor(v / 2) end pup = pup + math.floor(rest / 4) print(pup)