number = gets.chomp.to_i list = Array.new count = 0 for val in 1..number do list << val if number % val == 0 end for val in list do if list.include?(number / val) count += 1 end end puts count