using System; using static System.Console; using System.Linq; using System.Collections.Generic; using System.Runtime.Intrinsics.Arm; class Program { static int NN => int.Parse(ReadLine()); static long[] NList => ReadLine().Split().Select(long.Parse).ToArray(); public static void Main() { Solve(); } static void Solve() { var c = NList; var (n, k, m) = (c[0], c[1], c[2]); var dic = PDiv(n); foreach (var key in dic.Keys) dic[key] *= k; var ans = new HashSet{ 1 }; foreach (var kv in dic) { var nset = new HashSet(); foreach (var ai in ans) { var val = ai; nset.Add(val); for (var i = 0; i < kv.Value; ++i) { val *= kv.Key; if (val > m) break; nset.Add(val); } } ans = nset; } WriteLine(ans.Count); } static Dictionary PDiv(long n) { var dic = new Dictionary(); var tmp = n; while (tmp % 2 == 0) { tmp /= 2; if (dic.ContainsKey(2)) ++dic[2]; else dic.Add(2, 1); } for (var p = 3L; p * p <= n; p += 2) { while (tmp % p == 0) { tmp /= p; if (dic.ContainsKey(p)) ++dic[p]; else dic.Add(p, 1); } if (tmp == 1) break; } if (tmp > 1) dic.Add(tmp, 1); return dic; } }