def prime_sieve(n): # 素数リスト(エラトステネスの篩) is_prime = [True for i in range(n + 1)] is_prime[0] = False is_prime[1] = False for i in range(4, n + 1, 2): is_prime[i] = False for i in range(3, int(n**0.5 + 1), 2): if is_prime[i]: for j in range(i * i, n + 1, i): is_prime[j] = False return [i for i in range(n + 1) if is_prime[i]] N, K = map(int, input().split()) A = [0 for i in range(N + 1)] primes = prime_sieve(N) for p in primes: i = 1 while p*i<=N: A[p*i] += 1 i += 1 cnt = 0 for i in range(N+1): if A[i] >= K: cnt += 1 print(cnt)