def ascan; gets.split.map(&:to_i);end require 'prime' N,K = ascan p (2..N).count{|x| Prime.prime_division(x).size >= K}