object Main {
  val sc = new java.util.Scanner(System.in)

  def sin(n: Int): Seq[Int] = Seq.fill(n)(sc.nextInt())

  def main(args: Array[String]): Unit = {
    val m, d = sc.nextInt()
    println(
      (for(a <- 1 to m;
          b <- 1 to d
          if b % 10 >= 2 &&
             b / 10 >= 2 &&
             (b % 10) * (b / 10) == a) yield {1}).length
    )
  }
}