m,d = gets.chomp.split(" ").map(&:to_i)

cnt = 0

for i in 4..m do
    for j in 2..[i-1,9].min do 
        if i % j == 0
            d10 = i/j
            if (d10 * 10 + j) <= d 
                cnt += 1
            end
        end
    end
end

p cnt