import math n, k = [int(x) for x in input().split()] prime = [2 * n] * n idx_p = 0 for num in range(2, n + 1): is_prime = True sq = math.sqrt(num) for p in prime: if num % p == 0: is_prime = False break if p > sq: break if is_prime: prime[idx_p] = num idx_p += 1 cnt = [0] * (n + 1) for p in prime: for i in range(p, n + 1, p): cnt[i] += 1 res = 0 for c in cnt: if c >= k: res += 1 print(res)