#include "bits/stdc++.h" using namespace std; #define all(x) x.begin(),x.end() template ostream& operator<<(ostream &os, const pair &p) { return os << p.first << " " << p.second; } template::value, typename T_container::value_type>::type> ostream& operator<<(ostream &os, const T_container &v) { string sep; for (const T &x : v) os << sep << x, sep = " "; return os; } #ifdef LOCAL #include "debug.h" #else #define debug(...) 42 #define ASSERT(...) 42 #endif typedef long long ll; typedef vector vi; typedef vector vvi; typedef pair pi; const int oo = 1e9; typedef unsigned long long ull; ull modmul(ull a, ull b, ull M) { ll ret = a*b - M*ull(1.L/M*a*b); return ret + M*(ret<0) - M*(ret>=(ll)M); } ull modpow(ull b, ull e, ull mod) { ull ans = 1; for(;e;b=modmul(b,b,mod),e/=2) { if(e&1) ans = modmul(ans,b,mod); } return ans; } ull pollard(ull n) { auto f = [n](ull x) {return modmul(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=modmul(prd,max(x,y)-min(x,y),n))) prd=q; x = f(x),y=f(f(y)); } return gcd(prd,n); } bool isPrime(ull n) { if(n<2 || n%6%4!=1) return (n|1) ==3; ull A[] = {2,325,9375,28178, 450775,9780504, 17952650221}, s = __builtin_ctzll(n-1), d = n>>s; for(ull a : A) { ull p = modpow(a%n,d,n), i =s; while(p!=1 && p!=n-1 && a%n && i--) p = modmul(p,p,n); if(p!=n-1 && i!=s) return 0; } return 1; } map factor(ull n) { if(n==1 )return {}; if(isPrime(n)) return {{n,1}}; ull x = pollard(n); auto l = factor(x), r = factor(n/x); for(auto [i,c] : r) { l[i]+=c; } return l; } int main() { ios_base::sync_with_stdio(false); cin.tie(NULL); ll n; cin >> n; auto mp = factor(n); ll ans=1; for(auto [k,v] : mp) { ll cur=0; auto rec = [&](auto&& self, int at, int sum, int len) { if(sum==v) { cur++; return; } while(at+sum<=v) { self(self,at,sum+at,len+1); at++; } }; rec(rec,1,0,0); ans*=cur; } cout << ans << '\n'; }