#include <iostream>
#include<algorithm>
using namespace std;
int b;
bool check (int x){
if(x<2)return 1;
int k=2,m=-1;
while(x>0){
while(x%k==0){
x/=k,m=max(m,k);
}
k++;
}
return m<=b;
}
int main(){
int n;
cin>>n>>b;
int ans=0;
for(int i=1;i<=n;i++){
if(check(i)<=b)ans++;
}
cout<<ans;
return 0;
}