package main

import "fmt"

func main() {
	var m, d int
	fmt.Scan(&m, &d)
	sum := 0
	for i := 1; i <= m; i++ {
		for j := 1; j <= d; j++ {
			if v1, v2 := j/10, j%10; 2 <= v1 && 2 <= v2 {
				if i == v1*v2 {
					sum++
				}
			}
		}
	}
	fmt.Println(sum)
}
