import java.util.Scanner; public class Main { public static void main(String[] args){ Scanner s = new Scanner(System.in); String str = s.next(); s.close(); long n = Long.parseLong(str); long count = 0; long heihou = (long) Math.floor(Math.sqrt((double)n)); for(long i= 1;i<=heihou;i++){ if(n%i==0){ count++; String s1 = String.valueOf(i); String s2 = String.valueOf(n/i); long n1 = Long.parseLong(s1+s2); long n2 = Long.parseLong(s2+s1); if(n1 != n2){ count++; } } } System.out.println(count); } }