#a = gets.chomp.to_i
m,d = gets.chomp.split(" ").map{|i|i = i.to_i}
#s = gets.chomp

count = 0
d.times do|i|
  d_10 = ((i+1)/10)
  next if d_10 <= 1
  d_1 = ((i+1)%10)
  next if d_1 <= 1

  if (d_10*d_1) <= m then
    #puts "now d_10 = #{d_10}, d_1 = #{d_1}, m = #{m}"
    count += 1
  end
  
end
puts count