class Yukicoder def initialize n = gets.chomp.to_i a = gets.chomp.split(' ').map(&:to_i) hash = Hash.new(0) a.each do |num| hash[num] += 1 end puts hash.count{|k,v| v==1} end end Yukicoder.new