#pragma GCC optimize("Ofast") #include using namespace std; #define rep(i, n) for(int i = 0; i < (int)(n); ++i) #define all(x) x.begin(),x.end() #define ln '\n' const long long MOD = 1000000007LL; //const long long MOD = 998244353LL; typedef long long ll; typedef unsigned long long ull; typedef pair pii; typedef pair pll; template inline bool chmax(T &a, T b) { if (a < b) { a = b; return true;} return false; } template inline bool chmin(T &a, T b) { if (a > b) { a = b; return true;} return false; } /////////////////////////////////////////////////////////////////////////////////////////////////// int main() { ios::sync_with_stdio(false); cin.tie(nullptr); ll N,K,M; cin >> N >> K >> M; vector A; ll L = N; for (ll i = 2; i*i <= N; ++i) { if (L%i==0) { ll cnt = 0; while (L%i==0) { L /= i; cnt++; } A.emplace_back(i,cnt*K); } } if (L != 1) A.emplace_back(L,K); set dic; dic.emplace(1); ll P = A.size(); rep(i,P) { ll num,cnt; tie(num,cnt) = A[i]; vector B; for (auto j : dic) { ll val = j; rep(k,cnt) { val *= num; if (val > M) break; B.emplace_back(val); } } for (auto j : B) dic.emplace(j); } cout << dic.size() << ln; }