#include using namespace std; const int N_MAX = 2000000; int min_p[N_MAX + 10], cnt[N_MAX + 10], ps[N_MAX + 10]; int main(){ int N, K; cin >> N >> K; int res = 0; int ps_size = 0; for(int n=2;n<=N;n++)min_p[n] = n; for(int n=2;n<=N;n++){ if(min_p[n] == n){ cnt[n] = 1; ps[ps_size++] = n; } else { int mp = min_p[n]; if(min_p[n / mp] == mp){ cnt[n] = cnt[n / mp]; } else { cnt[n] = cnt[n / mp] + 1; } } for(int i=0;i min_p[n])break; int np = n * ps[i]; if(np > N)break; min_p[np] = ps[i]; } if(cnt[n] >= K)++res; } cout << res << endl; return 0; }