# https://atcoder.jp/contests/jsc2019-qual/tasks/jsc2019_qual_a

M, D = gets.split.map(&:to_i)

ans = 0
for m in 1..M
    for d in 1..D
        d1 = (d%10) 
        d2 = (d/10) 
        if d1 >= 2 && d2 >= 2 && (d%10) * (d/10) == m
            ans += 1
        end
    end
end

puts ans