# yukicoder No.106 素数が嫌い!2 N, K = map(int, input().split()) dp = [0 for i in range(N + 1)] if K == 1: print(N - 2 + 1) else: ans = 0 for i in range(2, (N + 1) // 2 + 1): if dp[i] == 0: for j in range(i, N + 1, i): dp[j] += 1 if dp[j] >= K: ans += 1 dp[j] = -N print(ans)