import java.util.Scanner

object Main extends App{

  val sc = new Scanner(System.in)


  val m = sc.nextInt
  val d = sc.nextInt

  val res = (1 to m).flatMap(decomNum)

  val res2 = res.count{case (a,b) => 10 * a + b <= d}
  println(res2)


  def decomNum(num: Int):Seq[(Int, Int)] = {
    (1 to num).foldLeft(Seq.empty[(Int, Int)]){ case (acc, n) =>
      (2 until num).filter{n => num % n == 0}.map( n => (n, num / n))
    }
  }


}