#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}; long long res = 0; while (a*(a + k) <= n){ long long cur = a*(a + k); for (int i = 1; cur <= n; cur *= (a + k*i)){ ++Key[cur]; if (Key[cur] == m){ ++res; } if (Key[cur] > m){ --res; } ++i; } ++a; } cout << res << endl; }