main = do [w, d] <- map (read :: String -> Int) . lines <$> getContents print $ foldr (\x acc -> acc-(acc `div` x^2)) w [2..d]