require 'prime' n = gets.chomp.to_i a = (1..n).map {|i| i if n % i == 0 }.compact list = [] a.permutation(2) {|a, b| list.push(a.to_s << b.to_s) if a * b == n } puts list.uniq.size