def main(argv)
  (m, d) = gets.chomp.split(' ').map(&:to_i)
  cnt = 0
  (1..m).each do |x|
    (1..d).each do |y|
      y10 = y / 10
      y01 = y % 10
      
      next if ((y01 <= 1) || (y10 <= 1))
      
      if (y10 * y01) == x then
        cnt += 1
      end
    end
  end
  puts cnt.to_s
end

if self.to_s == 'main' then
  main(ARGV)
end