m, d = gets.split.map(&:to_i)
count = 0
4.upto(m).each {|i|
    22.upto(d).each {|j|
        if j / 10 >= 2 && j % 10 >= 2 then
            if i == (j / 10) * (j % 10) then
                count += 1
            end
        end
    }
}
puts count
