#include #include #include #include #include #include #include #include using namespace std; template inline bool chmax(T& a, T b) { if (a < b) { a = b; return 1; } return 0; } template inline bool chmin(T& a, T b) { if (a > b) { a = b; return 1; } return 0; } using ll = long long; const long long MOD = 1e9+7; map prime_number_factor(int n) { map res; for (int i = 2; i * i <= n; i++) { while (n % i == 0) { ++res[i]; n /= i; } } if (n != 1) res[n] = 1; return res; } ll m; vector p; vector e; int dfs(ll total, int ptr) { if ((int)p.size() <= ptr) return 1; int res = 0; for (int i = 0; i < e.at(ptr) + 1; i++) { if (m < total) break; res += dfs(total, ptr + 1); total *= p.at(ptr); } return res; } int main() { ll n, k; cin >> n >> k >> m; auto ps = prime_number_factor(n); for (auto v: ps) { p.push_back(v.first); e.push_back(v.second * k); } cout << dfs(1, 0) << endl; }