def solve(N, K): ps = [0] * (N + 1) for i in range(2, N + 1): if ps[i]: continue for j in range(i, N + 1, i): ps[j] += 1 count = 0 for pi in ps[2:]: if pi >= K: count += 1 return count N, K = map(int, input().split()) print(solve(N, K))