let () = Scanf.scanf "%d %d" @@ fun m d ->
  Printf.printf "%d\n" @@
  Array.fold_left (Array.fold_left ( + )) 0 @@
  Array.init m @@ fun i ->
    Array.init d @@ fun j ->
      if
        2 <= (j + 1) mod 10 &&
        2 <= (j + 1) / 10 &&
        ((j + 1) mod 10) * ((j + 1) / 10) = i + 1
      then 1
      else 0