#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; #define REP(i,n) for(int i=0; i=b; --i) #define ALL(c) (c).begin(), (c).end() typedef long long ll; typedef vector VI; typedef vector VL; typedef vector VVL; typedef vector VVI; typedef pair P; typedef pair PL; string conv(ll x){ string ret; while (x) { char c = (x % 10) + '0'; ret = c + ret; x /= 10; } return ret; } int main() { ll x; cin >> x; set st; for (ll a = 1; a * a <= x; a++){ if (x % a != 0) continue; ll b = x/a; string sa = conv(a), sb = conv(b); st.insert(sa + sb); st.insert(sb + sa); } cout << st.size() << endl; return 0; }