m, d = gets.chomp.split.map(&:to_i)
cnt = 0
(4..m).each do |i|
  (2..[Math::sqrt(i).to_i, 9].min).each do |j|
    next if i % j != 0
    k = i / j
    next if k > 9 || k < 2
    cnt += 1 if 10 * j + k <= d
    cnt += 1 if 10 * k + j <= d && j != k
  end
end
puts cnt