import java.util.ArrayList; import java.util.Arrays; import java.util.Scanner; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); int N = scan.nextInt(); int K = scan.nextInt(); scan.close(); ArrayList list = new ArrayList(); int []n = new int[N + 1]; Arrays.fill(n, 0); for(int i = 2; i <= N; i++) { if(isPrime(i)) { list.add(i); } } for(int i : list) { int j = 1; while(i * j <= N) { n[i * j] ++; j ++; } } // for(int i : list) { // System.out.println(i); // } int cnt = 0; for(int i = 2; i <= N; i++) { if(n[i] == K) { cnt++; } } System.out.println(cnt); } public static boolean isPrime(long n) { for(long i = 2; i <= (int)Math.sqrt(n); i++){ if(n % i == 0) { return false; } } return true; } }