#include #include #include #include #include #include #include #include #include #include #include #include #include #define p(s) cout<<(s)<=n;i--) #define CK(n,a,b) ((a)<=(n)&&(n)<(b)) #define F first #define S second typedef long long ll; using namespace std; const int mod = 1e9+7; ll N; ll ans; set s; int main(){ cin>>N; for(ll i=1;i*i<=N;i++){ if(N%i==0){ string a = to_string(i); string b = to_string(N/i); s.insert(a + b); s.insert(b + a); } } p(s.size()); return 0; }