#include using namespace std; using ll=long long; #define rep2(i, a, n) for(int i = (a); i < (n); i++) #define rep(i, n) rep2(i,0,n) #define repe(i,a)for(auto &i:a) void in(){} template void in(Head&& head,Tail&&... tail){cin>>head;in(forward(tail)...);} //N^Kの正の約数 //n^k=n*n...*n(k); map enumpr(ll n) { map V; for(ll i=2;i*i<=n;i++) while(n%i==0) V[i]++,n/=i; if(n>1) V[n]++; return V; } ll fastpow(ll x, ll n) { ll ret = 1; while (0 < n) { if ((n % 2) == 0) x *= x, n >>= 1; else ret *= x, --n; } return ret; } ll n,k,m; //候補を決定 vector> primes; int dfs(ll cu, ll tot) { if(cu == primes.size()) return 1; ll res = 0; rep2(cnt, 0, primes[cu].second + 1) { ll tot2 = tot * fastpow(primes[cu].first, cnt); //M 以下のものの個数 if(m < tot2) break; res += dfs(cu + 1, tot2); } return res; } int main(){ cin.tie(nullptr);ios_base::sync_with_stdio(false); in(n,k,m); auto ep=enumpr(n); repe(p,ep)primes.push_back({p.first,p.second*k}); cout<