n = gets.to_i as = Hash.new(0) gets.split.map(&:to_i).each do |a| as[a] += 1 end puts as.count { |k,v| v == 1 }