N=int(input()) list1=[] if "1"+str(N) != str(N)+"1": list1=["1"+str(N),str(N)+"1"] for i in range(2,int(N**0.5)+1): if N%i==0: if i*i==N: if str(i)+str(i) not in list1: list1.append(str(i)+str(i)) else: pass else: a=int(N/i) if str(i)+str(a) not in list1: list1.append(str(i)+str(a)) else: pass if str(int(N/i))+str(i) not in list1: list1.append(str(int(N/i))+str(i)) else: pass else: list1=["1"+str(N)] for i in range(2,int(N**0.5)+1): if N%i==0: if i*i==N: if str(i)+str(i) not in list1: list1.append(str(i)+str(i)) else: pass else: a=int(N/i) if str(i)+str(a) not in list1: list1.append(str(i)+str(a)) else: pass if str(int(N/i))+str(i) not in list1: list1.append(str(int(N/i))+str(i)) else: pass print(len(list1))