#include using namespace std; int main() { long long N; cin >> N; long long ans = 0; set st; for( long long x = 1; x * x <= N; x++ ) { if( N % x ) continue; char s1[16], s2[16]; sprintf( s1, "%lld", x ); sprintf( s2, "%lld", N / x ); if( st.find( string( s1 ) + string( s2 ) ) == st.end() ) { ans++; st.insert( string( s1 ) + string( s2 ) ); } if( st.find( string( s2 ) + string( s1 ) ) == st.end() ) { ans++; st.insert( string( s2 ) + string( s1 ) ); } } cout << ans << endl; }