str = gets.split
M,D = str[0].to_i, str[1].to_i
answer = 0

for x in 1..M do
    for y in 22..D do
        a = y/10
        b = y%10
        if a >= 2 && b >= 2 && x == a*b
            answer += 1
        end
    end
end

puts answer