#include using namespace std; vector primes(1, 2); vector isPrime(static_cast(2 * 1e6 + 1), true); map dp; int cnt(int num) { if (num == 1) return 0; if (isPrime[num]) return 1; int numc = num; if (dp.count(num)) return dp[num]; int res = 0; for (int i = 0; primes[i] * primes[i] <= num; i++) { if (num % primes[i]) continue; res++; while (num % primes[i] == 0) num /= primes[i]; } return dp[numc] = 1 + cnt(num); } 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) ){ ans++; } } cout << ans << "\n"; } int main() { ios::sync_with_stdio(false); cin.tie(0); hawawa(); return 0; }