#include <bits/stdc++.h>
using namespace std;
int n,b,s;
bool zyf(int w) {
int ls=0;
for(long long int i=2; i*i<=w; i++) {
if(w%i==0) {
ls=i;
while(w%i==0) {
w/=i;
}
}
}
ls=max(ls,w);
if(ls<=b)return 1;
return 0;
}
int main() {
cin>>n>>b;
for(int i=1; i<=n; i++)if(zyf(i))s++;
cout<<s;
return 0;
}