// #include // Temp fix for gcc13 global pragma // #pragma GCC target("avx2,bmi2,popcnt,lzcnt") // #pragma GCC optimize("O3,unroll-loops") #include // #include using namespace std; #if __cplusplus >= 202002L using namespace numbers; #endif #ifdef LOCAL #include "Debug.h" #else #define debug(...) 42 #define debug2(...) 42 #define debug_endl(...) 42 #endif // Correctness proved in https://github.com/kth-competitive-programming/kactl/blob/master/doc/modmul-proof.pdf // twice faster than (__int128_t)a * b % M using ull = unsigned long long; ull mod_mul(ull a, ull b, ull M){ long long res = a * b - M * ull(1.L / M * a * b); return res + M * (res < 0) - M * (res >= (long long)M); } ull mod_pow(ull b, ull e, ull mod){ ull res = 1; for(; e; b = mod_mul(b, b, mod), e >>= 1) if(e & 1) res = mod_mul(res, b, mod); return res; } // Millar Rabin Primality Test // 7 times slower than a^b mod c bool isprime(ull n){ if(n < 2 || n % 6 % 4 != 1) return (n | 1) == 3; ull s = __builtin_ctzll(n - 1), d = n >> s; for(ull a: {2, 325, 9375, 28178, 450775, 9780504, 1795265022}){ ull p = mod_pow(a, d, n), i = s; while(p != 1 && p != n - 1 && a % n && i --) p = mod_mul(p, p, n); if(p != n - 1 && i != s) return false; } return true; } // Pollard rho algorithm // O(n^1/4) ull get_factor(ull n){ auto f = [n](ull x){ return mod_mul(x, x, n) + 1; }; ull x = 0, y = 0, t = 30, prd = 2, i = 1, q; while(t ++ % 40 || gcd(prd, n) == 1){ if(x == y) x = ++ i, y = f(x); if(q = mod_mul(prd, max(x, y) - min(x, y), n)) prd = q; x = f(x), y = f(f(y)); } return gcd(prd, n); } // Returns the prime factors in arbitrary order vector factorize(ull n){ if(n == 1) return {}; if(isprime(n)) return {n}; ull x = get_factor(n); auto l = factorize(x), r = factorize(n / x); l.insert(l.end(), r.begin(), r.end()); return l; } int main(){ cin.tie(0)->sync_with_stdio(0); cin.exceptions(ios::badbit | ios::failbit); vector dp(61, vector(61)); dp[0][0] = 1; for(auto x = 1; x <= 60; ++ x){ for(auto last = 1; last <= x; ++ last){ for(auto prev = 0; prev <= last && prev + last <= x; ++ prev){ dp[x][last] += dp[x - last][prev]; } } } vector count(61); for(auto x = 0; x <= 60; ++ x){ count[x] = accumulate(dp[x].begin(), dp[x].end(), 0LL); } long long n; cin >> n; map e; for(auto p: factorize(n)){ ++ e[p]; } debug(e); long long res = 1; for(auto [p, x]: e){ res *= count[x]; } cout << res << "\n"; return 0; } /* */