import java.util.Scanner; public class Yukicoder106 { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int n = sc.nextInt(); int k = sc.nextInt(); int res = 0, buf; boolean[] num = new boolean[n+1]; for (int i = 2; i <= n; i++) { if (num[i]) continue; if (isHatePrime(i, k)) { res++; for (int j = 1; ; j++){ buf =i * j; if (buf <= n) { num[buf] = true; } else break; } } } System.out.println(res); } public static boolean isHatePrime(long num, long k) { long dist = 0; for (long i = 2; i <= num; i++) { if (num % i == 0) { dist++; if (dist >= k) return true; do { num /= i; } while (num % i == 0); } } return false; } }