let m, d = Scanf.scanf " %d %d" @@ fun a b -> a, b
let f m d = d mod 10 >= 2 && d / 10 >= 2 && d / 10 * (d mod 10) = m
let ans = ref 0
let _ = for i = 2 to m do for j = 2 to d do if f i j then incr ans done done; Printf.printf "%d\n" !ans