def main
  m, d = gets.chop.split.map(&:to_i)
  ans = 0
  1.upto(m) do |_m|
    1.upto(d) do |_d|
      ans += 1 if is_ok(_m, _d)
    end
  end
  puts ans
end

def is_ok(m, d)
  d1 = d % 10
  d2 = d / 10
  (d1 >= 2) and (d2 >= 2) and (m == d1 * d2)
end

if __FILE__ == $0
  main
end
