#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pairP; mapflg; vector

vec; int main(){ ll N, K, M; cin >> N >> K >> M; mapcnt; for(ll i = 2; i * i <= N; i++){ while(N % i == 0){ cnt[i]++; N /= i; } } if(N != 1)cnt[N] = 1; vector

vec; for(map::iterator it = cnt.begin(); it != cnt.end(); it++){ vec.push_back(P((*it).first, (*it).second * K)); } // for(ll i = 0; i < vec.size(); i++){ // cout << vec[i].first << ", " << vec[i].second << endl; // } queueQ; Q.push(1); flg[1] = 1; ll ans = 1; while(!Q.empty()){ vectortmp(vec.size(), 0); ll n = Q.front(); N = n; Q.pop(); for(ll i = 0; i < vec.size(); i++){ while(n % vec[i].first == 0){ tmp[i]++; n /= vec[i].first; } } for(ll i = 0; i < vec.size(); i++){ ll hoge = N * vec[i].first; if(tmp[i] < vec[i].second && hoge <= M && flg[hoge] == 0){ Q.push(hoge); flg[hoge] = 1; ans++; } } } cout << ans << endl; return 0; }