#include #include #include using namespace std; /*int sosu(long long N){ long long A; int J = 0; for (long long i1 = 2; i1 < N/2; i1++){ A = (N / i1)*i1; if (A == N){ J = 1; break; } } return J; }*/ int main(){ long long n; long long a; int k; int cnt = 0; int cnt1 = 0; int ans = 0; cin >> n >> k; for (long long i1 = 2; i1 < n+1; i1++){ a = i1; for (long long i = 2; i < sqrt(n); i++){ while (a%i == 0){ a /= i; cnt++; } if (cnt>0){ cnt1++; cnt = 0; } } if (a != 1) cnt1++; if (cnt1 >= k) ans++; cnt1 = 0; } if (k > 0){ cout << ans << endl; } else{ cout << ans + 1 << endl; } return 0; }