n = gets.strip.to_i a = gets.strip.split(' ') count = 0 h = Hash.new(0) a.each do |k| h[k] += 1 end h.each do |k, v| count += 1 if v == 1 end puts count