// No.537 ユーザーID #include using namespace std; #define rep(i,n) for(int i=0;i inline void chmax(T &a, const T &b) { if(a < b) a = b; } template inline void chmin(T &a, const T &b) { if(a > b) a = b; } typedef long long ll; inline string itos(int a,int b){ stringstream ssa,ssb; ssa << a; ssb << b; return ssa.str()+ssb.str(); } signed main(void){ int n; cin >> n; vector > pairs; betw(i,1,static_cast(sqrt(n))+1){ if (n%i==0){ pair temp(n/i,i); pairs.push_back(temp); } } set sets; rep(i,pairs.size()){ string a = itos(pairs.at(i).first,pairs.at(i).second); string b = itos(pairs.at(i).second,pairs.at(i).first); sets.insert(a); sets.insert(b); } cout << sets.size() << endl; }