N = gets.to_i p [].tap { |a| (1..(N ** 0.5)).each { |i| next if N % i > 0 a << i.to_s + (N / i).to_s a << (N / i).to_s + i.to_s } } .uniq.size