fun main(arr:Array<String>) {
    val (m,d) = readLine()!!.split(" ").map { it.toInt() }
    val target = (1..m).map {m-> (22..d).map { listOf(it / 10, it % 10) }.filter { it[0]*it[1] == m && it.all { b->b>=2 } }.count() }
    val ans = target.sum()
    println(ans)
}