from heapq import * from copy import copy def getDivisors(n: int): # validation check if not isinstance(n, int): raise("[ERROR] parameter must be integer") if n < 0: raise("[ERROR] parameter must be not less than 0 (n >= 0)") lowerDivisors, upperDivisors = [], [] i = 1 while i * i <= n: if n % i == 0: lowerDivisors.append(i) if i != n // i: upperDivisors.append(n//i) i += 1 return lowerDivisors + upperDivisors[::-1] N,K,M = map(int,input().split()) l = getDivisors(N) hq = l.copy() count = 0 M = min(N**K,M) seen = [0]*(M+1) while hq: q = heappop(hq) if q > M: break for i in l: num = q*i if num > M or (N**K)%num != 0 or seen[num] == 1: continue count += 1 seen[num] = 1 heappush(hq,num) print(count)