import Control.Applicative ((<$>)) main :: IO () main = solve <$> map read <$> words <$> getLine >>= print solve :: [Int] -> Int solve [n, k] = length . filter (f k 0 2) $ [2..n] where f k c d x | x == 1 = c >= k | x `mod` d == 0 = f k (c+1) (d+1) (g d x) | d ^ 2 > x = c + 1 >= k | otherwise = f k c (d+1) x g d x | x `mod` d == 0 = g d (x `div` d) | otherwise = x