M, D = gets.split.map(&:to_i)

res = 0
1.upto(M) do |m|
    1.upto(D) do |d|
        sd = []
        sd << d / 10
        sd << d % 10
        res += 1 if m == sd[0] * sd[1] && sd[0] > 1 && sd[1] > 1
    end
end

puts res