#include using namespace std; class SieveOfEratosthenes { private: std::vector sieve; public: SieveOfEratosthenes(int n) : sieve(n + 1) { std::iota(sieve.begin(), sieve.end(), 0); for (int i = 2; i * i < n + 1; i++) { if (sieve[i] != i) continue; for (int j = i * i; j < n + 1; j += i) { if (sieve[j] == j) sieve[j] = i; } } } bool is_prime(int x) const { return x != 0 && x != 1 && sieve[x] == x; } int factor(int x) const { std::vector res; set st; while (x > 1) { res.emplace_back(sieve[x]); st.insert(sieve[x]); x /= sieve[x]; } return (int)st.size(); } }; int main() { ios::sync_with_stdio(false); cin.tie(nullptr); int N, K; cin >> N >> K; SieveOfEratosthenes soe(N + 1); int res = 0; for (int i = 0; i < N + 1; i++) { if (soe.factor(i) >= K) res++; } cout << res << '\n'; return 0; }