n, k = map(int, input().split()) IsPrime = [True for _ in range(n + 1)] IsPrime[0] = IsPrime[1] = False C = [0 for _ in range(n + 1)] for i in range(2, n + 1): if IsPrime[i]: C[i] += 1 for j in range(i + i, n + 1, i): C[j] += 1 IsPrime[j] = False ans = 0 for i in range(2, n + 1): if C[i] >= k: ans += 1 print(ans)