#include using namespace std; vector primes(1, 2); vector isPrime(static_cast(2 * 1e6 + 1), true); map dp; int cnt(int num, int now) { if (num == 1 && num < primes[now]) return 0; int numc = num; if (dp.count(num)) return dp[num]; if (num % primes[now]) { return dp[num] = cnt(num, now + 1); } while (num % primes[now] == 0) { num /= primes[now]; } return dp[numc] = 1 + cnt(num, now + 1); } void hawawa() { int n, k; cin >> n >> k; isPrime[0] = isPrime[1] = false; for (long long i = 3; i <= 2 * 1e6; i += 2) { if (!isPrime[i]) continue; for (long long j = i * i; j <= 2 * 1e6; j += i) { isPrime[j] = false; } primes.push_back(i); } int ans = 0; for (int i = n; i >= 2; i--) { if (k <= cnt(i, 0)) { ans++; } } cout << ans << "\n"; } int main() { ios::sync_with_stdio(false); cin.tie(0); hawawa(); return 0; }