#include unsigned long long int digit(unsigned long long int x){ int d=0; while(x!=0){ x/=10; d++; } return d; } unsigned long long int makex(unsigned long long int a,unsigned long long int b){ int i,d; d = digit(b); for(i = 1;i <= d;i++){a*=10;} return a+b; } int main(void){ unsigned long long int n,r[131072]={0},c=0,x1,x2,i,j; scanf("%llu",&n); for(i = 1;i*i <= n;i++){ if(n%i != 0){continue;} x1=makex(i,n/i); x2=makex(n/i,i); if(c == 0){r[1] = x1;c=1;} for(j = 1;j <= c;j++){ if(r[j] == x1){break;} if(j == c){c++;r[c] = x1;break;} } for(j = 1;j <= c;j++){ if(r[j] == x2){break;} if(j == c){c++;r[c] = x2;break;} } } printf("%llu\n",c); return 0; }