defmodule Main do def main do n = IO.gets("") |> String.trim |> String.to_integer IO.stream(:stdio, :line) |> Enum.take(n) |> Enum.map(&String.trim/1) |> Enum.map(&String.split/1) |> Enum.map(&Enum.map(&1, fn num -> String.to_integer(num) end)) |> Enum.flat_map(fn x -> x end) |> Enum.group_by(fn x -> x end) |> Enum.map(fn {_, value} -> Enum.count(value) end) |> Enum.map(fn x -> div(x,2) + rem(x,2)/4 end) |> Enum.sum |> trunc |> IO.puts end end