#include "bits/stdc++.h" using namespace std; using ll = long long; using pii = pair; using pll = pair; using vi = vector; using vl = vector; using vvi = vector; using vvl = vector; const int INF = 1 << 28; const ll MOD = 1000000007; template bool chmax(T &a, const T &b) { return (a < b) ? (a = b, 1) : 0; } template bool chmin(T &a, const T &b) { return (b < a) ? (a = b, 1) : 0; } template void primeFactors(T a, map &facs) { double sqrtA = sqrt(a); for (int i = 2; i <= sqrtA + 1e-10; ++i) { while (a % i == 0) { facs[i]++; a /= i; } } if (a > sqrtA) facs[a]++; return; } ll fastPow(ll a, ll n) { ll res = 1; while (n > 0) { if (n & 1) res = res * a; a = a * a; n >>= 1; } return res; } int main() { ll n, k, m; cin >> n >> k >> m; map facs; primeFactors(n, facs); for (auto &p : facs) { p.second *= k; } set ret; set temp; ret.emplace(1); for (auto &p : facs) { temp.clear(); for (auto &r : ret) { for (int i = 0; i <= p.second; ++i) { ll next = r * fastPow(p.first, i); if (next <= m) temp.emplace(next); else break; } } ret = temp; } cout << ret.size() << "\n"; return 0; }