gets array = gets.chomp.split(" ").map(&:to_i) table = array.uniq n = table.size table.each{|value| if array.count(value) > 1 n -= 1 end array.delete(value) } puts n