#define _USE_MATH_DEFINES #define _CRT_SECURE_NO_WARNINGS #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; //#include bool f[100000000]; int main() { long long int n; cin >> n; long long int a = 0; for(int i=1;i*i<=n;i++){ if (n%i == 0) { long long int x = n/i,y=i; int t = 1,r=1; while (x) { x /= 10; t*=10; } while (y) { y /= 10; r*=10; } if (!f[(n / i)*r + i])a++;f[(n / i)*r + i] = 1; if (!f[i*t + (n / i)])a++; f[i*t + (n / i)] = 1; //cout << (n / i)*r + i << " "<< i*t + (n / i)<