N, K = map(int, input().split()) if K == 1: print(N - 2 + 1) quit() dp = [0] * (N + 1) for p in range(2, N + 1): if p**2 > N: break if dp[p] > 0: continue for m in range(p, N + 1, p): dp[m] += 1 ans = 0 for d in dp: if d >= K: ans += 1 print(ans)