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|
    output += 1 if i%j == 0
  end
  output += 1 if i % max == 0 && i/max <= maxLast
end

puts output
