from collections import defaultdict def factorization(n): arr = defaultdict(int) for i in range(2, int(-(-n**0.5//1))+1): while n % i == 0: arr[i] += 1 n //= i if n != 1: arr[n] += 1 return arr visited = defaultdict(bool) def dfs(num, lst): for i in range(len(lst)): visited[num] = True if lst[i] < values[i] and not visited[num*keys[i]] and num*keys[i] <= m: lst[i] += 1 dfs(num*keys[i], lst) lst[i] -= 1 n, k, m = map(int, input().split()) if n == 1: print(1) exit() f = factorization(n) keys = list(f.keys()) values = [v*k for v in f.values()] dfs(1, [0]*len(keys)) print(sum(visited.values()))