#include using namespace std; typedef long long ll; vector> v; ll N, K, M; int cnt = 0; void dfs(int n, ll x) { if (v.size() == n) { cnt++; return; } for (ll i : v[n]) { if (x * i <= M) { //cout << x * i << "\n"; dfs(n + 1, x * i); } else { return; } } } int main() { cin >> N >> K >> M; map m; ll t = N; for (int i = 2; i * i <= N; i++) { while (t % i == 0) { t /= i; m[i]++; } if (t == 1) break; } if (t != 1) { m[t]++; } for (auto i = m.begin(); i != m.end(); i++) { ll p = i->first; //cout << p << "\n"; ll k = K * i->second; ll cnt = 1; ll P = p; set s{1}; while (P <= M && cnt <= k) { s.insert(P); P *= p; cnt++; } if (s.size() != 1) { v.push_back(s); } } // for (set i : v) { // for (ll j : i) { // cout << j << " "; // } // cout << "\n"; // } dfs(0, 1); cout << cnt << "\n"; return 0; }