object Main extends App {
  val sc = new java.util.Scanner(System.in)
  val M, D = sc.nextInt()
  val dayOfProducts = for {
    m <- 1 to M
    d <- (22 to D).filter(2 <= _ % 10)
    if m == (d / 10) * (d % 10)
  } yield ()
  println(dayOfProducts.size)
}
