N, K = map(int, input().split()) t = [0] * (N+1) for i in range(2, N+1, 2): t[i] = 1 for i in range(3, N+1, 2): if t[i] != 0: continue for j in range(i, N+1, i): t[j] += 1 ans = 0 for i in range(N+1): if t[i] >= K: ans += 1 print(ans)