#include #define show(x) cout << #x << " = " << x << endl using namespace std; using ll = long long; using pii = pair; template ostream& operator<<(ostream& os, const vector& v) { os << "sz=" << v.size() << "\n["; for (const auto& p : v) { os << p << ","; } os << "]\n"; return os; } template ostream& operator<<(ostream& os, const pair& p) { os << "(" << p.first << "," << p.second << ")"; return os; } constexpr ll MOD = 1e9 + 7; template constexpr T INF = numeric_limits::max() / 100; int main() { ll n; cin >> n; unordered_set cand; int num = 0; for (auto i = 1; i * i <= n; i++) { if (n % i == 0) { if (i * i == n) { const string s = to_string(i); const string str = s + s; if (cand.find(str) == cand.end()) { cand.insert(str); num++; } } else { const string s1 = to_string(i); const string s2 = to_string(n / i); if (cand.find(s1 + s2) == cand.end()) { cand.insert(s1 + s2); num++; } if (cand.find(s2 + s1) == cand.end()) { cand.insert(s2 + s1); num++; } } } } cout << num << endl; return 0; }