#include #define rep(i,n) for (int i = 0; i < (n); i ++) using namespace std; typedef long long ll; typedef pair PL; typedef pair P; const int INF = 1e9; const ll MOD = 1e9 + 7; const double eps = 1e-6; int main(){ ll N; cin >> N; set password; for (ll i = 1;i*i <= N;i++){ if (N%i == 0){ ll j = N/i; string s = to_string(i),t = to_string(j); password.insert(s + t); password.insert(t + s); } } int ans = password.size(); cout << ans << endl; return 0; }