require 'prime' n, k = gets.strip.split(' ').map(&:to_i) count = 0 (2..n).each do |i| if i.prime_division.length >= k count += 1 end end p count