n=gets.to_i a=gets.split.map(&:to_i) puts a.each_with_object(Hash.new(0)){|v,h|h[v]+=1}.select{|k,v|v==1}.size