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[] sosuu = new int[n+1]; for(int i=2;i<=n;i++){ if(sosuu[i]==0){ int x = i*2; while(x<=n){ sosuu[x]++; x+=i; } } } int ans=0; for(int i=2;i<=n;i++){ if(sosuu[i]>=k) ans++; } System.out.println(ans); } }