#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define lint long long int /* vectoral(26); al = {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'}; vectorAL(26); AL = {'A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z'}; */ int main() { lint N; cin >> N; lint n = sqrt(N); vectorvec1(n*10); vectorvec2(n*10); lint cnt = 0; for (int i = 1; i <= n; i++) { if (N % i == 0) { vec1.at(cnt) = i; vec2.at(cnt) = N / i; cnt++; } } lint k = 0; vectorveca(n * 10); while (vec1.at(k) != 0) { veca.at(2*k) = to_string(vec1.at(k)) + to_string(vec2.at(k)); veca.at(2 * k + 1) = to_string(vec2.at(k)) + to_string(vec1.at(k)); k++; } sort(veca.begin(), veca.end()); int ans = 0; for (int i = 0; i < n * 10-1; i++) { if (veca.at(i) != veca.at(i + 1)) { ans++; } } cout << ans << endl; }