n, k, m = map(int, input().split()) cnt = {} for i in range(2, int(n ** 0.5 + 1)): if n % i == 0: while n % i == 0: n //= i cnt[i] = cnt.get(i, 0) + k if n != 1: cnt[n] = k se = {1} for k, v in cnt.items(): times = 1 se2 = set() for _ in range(v + 1): for s in se: if times * s <= m: se2.add(times * s) times *= k if times > m: break se = se2 print(len(se))