#include using namespace std; int main(){ ios_base::sync_with_stdio(false); cin.tie(nullptr); int Need = 2000000; vector allp; vector prime(Need+1,true); prime.at(0) = false; prime.at(1) = false; for(int i=2; i<=Need; i++){ if(!prime.at(i)) continue; allp.push_back(i); for(long long k=((long long)i)*i; k<=Need; k+=i) prime.at(k) = false; } int N,K; cin >> N >> K; int answer = 0; for(int i=2; i<=N; i++){ int v = i,now = 0; for(auto p : allp){ if(p*p > v) break; if(v%p) continue; now++; while(v%p == 0) v /= p; } if(v != 1) now++; answer += now>=K; } cout << answer << endl; }