#include #include #include #include #include #include #define MP make_pair using ll = long long; using namespace std; int main() { ll N; cin >> N; int cnt=0; for(ll i=1; i < sqrt(N); i++){ if(N%i == 0){ string a = to_string(i); string b = to_string(N/i); string x = a+b; string y = b+a; if(x == y) cnt += 1; else cnt += 2; } } if(ceil(sqrt(N)) == floor(sqrt(N))) cnt++; cout << cnt << endl; return 0; }