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