let md = stdin.ReadLine().Split() |> Array.map int

let ls = [for i in 2..9 do
          for j in 2..9 do
           yield (i,j)]

ls
|> List.sumBy (fun (x,y) -> if ((x * y) <= md.[0]) && ((10 * x + y) <= md.[1]) then 1 else 0)
|>stdout.WriteLine