package main import ( "bufio" "fmt" "math" "os" "strconv" ) var sc = bufio.NewScanner(os.Stdin) var rdr = bufio.NewReaderSize(os.Stdin, 1000000) func main() { sc.Split(bufio.ScanWords) n, k := nextInt(), nextInt() ps, ns := eratosthenes(n), make([]int, n+1) for _, v := range ps { for i := v; i <= n; i += v { ns[i]++ } } t := 0 for _, v := range ns { if v >= k { t++ } } fmt.Println(t) } func nextLine() string { sc.Scan() return sc.Text() } func nextInt() int { i, _ := strconv.Atoi(nextLine()) return i } func eratosthenes(n int) []int { if n < 2 { return []int{} } r := int(math.Floor(math.Sqrt(float64(n)))) list := make([]bool, n+1) list[0], list[1] = true, true for i := 2; i <= r; i++ { if !list[i] { for j := i * i; j <= n; j += i { list[j] = true } } } l := n / int(math.Ceil(math.Log(float64(n)))) primes := make([]int, 0, l) for i, v := range list { if v { continue } primes = append(primes, i) } return primes }