#include #include using namespace std; const int MAX_N = 2000010; bool prime_table[MAX_N]; int count_table[MAX_N]; void sieve(int num) { fill(prime_table, prime_table + MAX_N, true); prime_table[0] = prime_table[1] = false; for (auto n = 2; n * n <= num; n++) { if (prime_table[n]) for (auto i = 2; i * n <= num; i++) { prime_table[i * n] = false; } } } int main() { int n, k; cin >> n >> k; sieve(n); auto ans = 0; for (auto i = 2; i <= n; i++) { if (prime_table[i]) { for (auto j = 1; i * j <= n; j++) { count_table[i * j]++; } } if (count_table[i] >= k) ans++; } cout << ans << endl; return 0; }