#!/usr/bin/env ruby n = gets.to_i tbl = Hash.new gets.chomp.split.map(&:to_i).each do |i| tbl[i] ||= 0 tbl[i] += 1 end puts tbl.count{|_,v| v==1}