import java.util.Scanner; import java.util.ArrayList; 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)); ArrayList lList = new ArrayList(); boolean b1; boolean b2; String s1; String s2; long n1; long n2; for(long i= 1;i<=heihou;i++){ if(n%i==0){ s1 = String.valueOf(i); s2 = String.valueOf(n/i); n1 = Long.parseLong(s1+s2); n2 = Long.parseLong(s2+s1); b1 = true; b2 = true; for(long l:lList){ if(l == n1){ b1 = false; break; } } if(b1){ count++; lList.add(n1); } if(n1 != n2){ for(long l:lList){ if(l == n2){ b2 = false; break; } } if(b2){ count++; lList.add(n2); } } } } System.out.println(count); } }