import Data.Bits
import Data.List
import Data.Foldable(foldlM)
import Data.Maybe(fromJust)
import Control.Monad
import Data.Array as A ((!),accumArray)
import Data.Graph
import qualified Data.Vector.Unboxed as V
import qualified Data.Vector.Unboxed.Mutable as VM
import Control.Monad.ST
import Data.Maybe (fromMaybe)
import qualified Data.ByteString.Char8 as BS
import Debug.Trace

toTuple :: [a] -> (a,a)
toTuple (x:y:_) = (x,y)
toTuple _ = undefined

getInt :: IO Int
getInt = fst . fromJust. BS.readInt <$> BS.getLine

getIntList :: IO [Int]
getIntList = unfoldr (BS.readInt . BS.dropWhile (== ' ')) <$> BS.getLine

getLineB :: (Read a) => IO [a] --直接入力
getLineB = map (read.BS.unpack) . BS.words <$> BS.getLine

--solve :: Int -> V.Vector Int -> IO ()
--solve q vec = do

main :: IO ()
main = do
  [m,d] <- getIntList
  ans <- fmap sum $ forM [4..m] $ \m -> do
    fmap sum $ forM [22..d] $ \i -> do
      let d1 = i `mod` 10
          d10 = i `div` 10
      if d1 < 2 || d10 < 2 then return 0
        else if d1*d10 == m then return 1
          else return 0
  print (ans :: Int)
