import java.math.*; import java.util.*; class Main{ public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int k = sc.nextInt(); int ans=0; for(int i=2;i<=n;i++){ int num=i; int temp=0; for(int j=2;j*j<=num;j++){ if(num%j==0) temp++; while(num%j==0){ num/=j; } } if(num>1) temp++; if(temp>=k) ans++; } System.out.println(ans); } }