n = gets.to_i a = gets.split.map &:to_i p a.tally.sum {_2 / 2}