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

output = 0

max = D/10
maxLast = D%10
(4..M).each do |i|
  (2..(max-1)).each do |j|
    next if i%j != 0
    r = i/j
    output += 1 if r < 10 && r > 1
  end
  output += 1 if max > 1 && i % max == 0 && i/max <= maxLast && i/max > 1
end

puts output
