#include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define MAX_N 1000100 #define PI 3.141592653589 #define EPS 1e-20 #define BS 10 #define MOD 1000000009 #define ZERO 10001 #define YJSNPI 8101919 #define INF (1 << 28) #define ADD(a, b) a = (a + (ll)b) % MOD #define MUL(a, b) a = (a * (ll)b) % MOD #define MAX(a, b) a = max(a, b) #define MIN(a, b) a = min(a, b) using namespace std; typedef pair pi; typedef pair ppi; int N, K; int cnt[2000010]; int main() { cin >> N >> K; int ans = 0; for(int i = 2; i <= N; i++) { if(cnt[i] == 0) { for(int j = i; j <= N; j += i) { cnt[j]++; } } if(cnt[i] >= K) ans++; } cout << ans << endl; }