def prime_factors(N): res = {} for i in range(2, int(N ** 0.5) + 1): while N % i == 0: res.setdefault(i, 0) res[i] += 1 N //= i if N != 1: res[N] = 1 return res N, K, M = map(int, input().split()) N_pf = prime_factors(N) NK_pf = [] for p, q in N_pf.items(): NK_pf.append((p, q * K)) import sys sys.setrecursionlimit(10 ** 7) def dfs(product, idx): global ans if idx == L: if product <= M: ans += 1 return for i in range(NK_pf[idx][1] + 1): if product * pow(NK_pf[idx][0], i) <= M: dfs(product * pow(NK_pf[idx][0], i), idx + 1) else: break L = len(NK_pf) ans = 0 dfs(1, 0) print(ans)