import java.io.InputStream; import java.io.PrintWriter; import java.lang.reflect.Array; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; import java.util.List; import java.util.Map; import java.util.Map.Entry; import java.util.PriorityQueue; import java.util.Scanner; import java.util.Set; import java.util.Stack; import java.util.TreeMap; import java.util.TreeSet; import static java.util.Comparator.*; public class Main { public static void main(String[] args) { PrintWriter out = new PrintWriter(System.out); Solver solver = new Solver(System.in, out); solver.solve(); out.close(); } } class Solver { Scanner sc; PrintWriter out; public Solver(InputStream in, PrintWriter out) { sc = new Scanner(in); this.out = out; } // ================================================================== // 単純な素因数分解 Map dec(long n){ // 割った数を保存するマップ 3で2回割れたら、ans.get(3) == 2 となる // Map ans = new HashMap(); Map ans = new TreeMap(Collections.reverseOrder()); long num = n; Long wk = 0L; // 2 ~ ルートn の間、繰り返す for(long i = 2; i * i <= n && num != 1; ++i){ // i で割り切れる間、割る while(num % i == 0){ num /= i; wk = ans.get(i); if(wk == null) { ans.put(i, 1L); } else { ans.replace(i, (wk+1L)); } } } if(num != 1) { wk = ans.get(num);// 最後に残った数も含める if(wk == null) { ans.put(num, 1L); } else { ans.replace(num, (wk+1L)); } } return ans; } long N, K, M; int[] X; long[] Y; int dfs(int now, int total) { // out.println("now = " + now + " total = " + total); if(now >= X.length) return 1; // 約数すが、ひとつ見つかった int ans = 0, wk = total; for (int i = 0; i <= Y[now]; i++) { if(i > 0) wk *= X[now]; if(wk > M) break; ans += dfs(now + 1, wk); } // out.println("now = " + now + " total = " + total + " --> ans = " + ans); return ans; } public void solve() { N = Integer.parseInt(sc.next()); K = Integer.parseInt(sc.next()); M = Integer.parseInt(sc.next()); Map map = dec(N); X = new int[map.keySet().size()]; Y = new long[map.keySet().size()]; int cnt = 0; for(long key : map.keySet()) { X[cnt] = (int)key; Y[cnt] = map.get(key) * K; // out.println("X = " + X[cnt] + " Y = " + Y[cnt]); cnt++; } out.println(dfs(0, 1)); } // ================================================================== }