def count_exact_prime_factors(N, M): primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29] if M == 0: return 1 if N >= 1 else 0 if M > len(primes): return 0 product = 1 for i in range(M): product *= primes[i] if product > N: return 0 return N // product # Read input N, M = map(int, input().split()) # Compute and print the result print(count_exact_prime_factors(N, M))