number = gets.chomp.to_i list = Array.new for val in 1..number do list << val if number % val == 0 end p list.length