#include using namespace std; #define rep(i,n) for(int i = 0; i < (n);i++) #define sz(x) int(x.size()) typedef long long ll; typedef pair P; map< ll, int > prime_factor(ll n) { map< ll, int > res; for(ll i = 2; i * i <= n; i++) { while(n % i == 0) { res[i]++; n /= i; } } if(n != 1) res[n] = 1; return res; } vector> ps; ll n, m, k; int dfs(int index, ll mul) { if (index == ps.size()) return 1; int cnt = 0; ll t = 1; rep(i,ps[index].second + 1) { cnt += dfs(index+1,mul*t); t *= ps[index].first; if (t * mul > m) break; } return cnt; } int main(){ cin >> n >> k >> m; auto fact = prime_factor(n); for (auto &p : fact) ps.push_back({p.first, p.second * k}); cout << dfs(0,1) << endl; return 0; }