#include using namespace std; long long n, k, m; int main(){ cin >> n >> k >> m; long long a = 1; long long Key[n + 1] = {0}; while (a*(a + k) <= n){ long long cur = a*(a + k); for (int i = 2; cur <= n; cur *= (a + k*i)){ ++Key[cur]; } ++a; } long long res = 0; for (long long i = 1; i <= n; ++i){ if (Key[i] == m) ++res; } cout << res << endl; }