m,d = gets.split(" ").map(&:to_i)
count = 0
if d <= 21 then
    count = 0
else
    for i in 1..m do
        for j in 22..d do
            k = j / 10 
            l = j % 10
            mul = k * l
            if i == mul && k >= 2 && l >= 2 then
                count += 1
            end
        end
    end
end
puts count