import java.util.*

fun main(args: Array<String>) {
	val scanner = Scanner(System.`in`)
	val M = scanner.nextInt()
	val D = scanner.nextInt()

	var cnt = 0

	for (m in 4..M) {
		for (d in 22..D){
			val d1 = d%10
			val d10 = d/10
			if (d1>=2 && d1*d10==m) cnt++
		}
	}

	println(cnt)
}