#include using namespace std; int main() { int64_t n, k, m; cin >> n >> k >> m; if (n == 1) { cout << 1 << endl; return 0; } vector pf; for (int64_t i = 2; i * i <= n; i++) { while (n % i == 0) { pf.emplace_back(i); n /= i; } } if (n != 1) { pf.emplace_back(n); } sort(pf.begin(), pf.end()); vector> v; v.push_back({pf[0], 1}); for (int64_t i = 1; i < pf.size(); i++) { if (v.rbegin()->first == pf[i]) { v.rbegin()->second++; } else { v.push_back({pf[i], 1}); } } for (auto &p : v) { p.second *= k; } auto f = [&](auto &g, int64_t now = 1, int64_t i = 0) { if (m < now) { return int64_t(0); } if (i == v.size()) { return int64_t(now <= m); } int64_t r = 0; for (int64_t j = 0, l = 1; j <= v[i].second; j++, l *= v[i].first) { r += g(g, now * l, i + 1); } return r; }; cout << f(f) << endl; return 0; }