m,d = gets.chomp.split(/\s/).map{|x| x.to_i}

days = 0
for mm in 1..m
    for dd in 22..d
        e1 = dd.to_s[0].to_i
        e2 = dd.to_s[1].to_i
        days += 1 if e1 >= 2 and e2 >= 2 and e1*e2 == mm
    end
end

puts days