N, K = map(int, input().split()) distinct_prime_factor_count = [0]*(N + 1) primes = [] for i in range(2, N + 1): if distinct_prime_factor_count[i] == 0: primes.append(i) for num in range(i, N + 1, i): distinct_prime_factor_count[num] += 1 ans = 0 for i in range(2, N + 1): if distinct_prime_factor_count[i] >= K: ans += 1 print(ans)