local read = setmetatable({}, {__index = function(t, k) local a = {} for i=1,#k do table.insert(a, string.sub(k, i, i)) end local r = io.read local u = table.unpack return function() return r(u(a)) end end})
local M, D = read.nn()
local function check(m, d)
    local d1 = d % 10
    local d2 = d // 10
    if d1>=2 and d2>=2 then
        return d1*d2 == m
    else
        return false
    end
end
local ans = 0
for m=1,M do
    for d=1,D do
        ans = ans + (check(m, d) and 1 or 0)
    end
end

print(ans)