Public Class Program
  Shared Sub Main()
    Dim md As Integer() = Array.ConvertAll(Of String, Integer)(Console.ReadLine().Split(" "), AddressOf Integer.Parse)
    Dim m As Integer = md(0)
    Dim d As Integer = md(1)
    ' d1 >= 2, d10 >= 2, d1 * d10 = m のため、積の日は4月から存在する '
    Dim ans As Integer = 0
    If m > 3 Then
      For i As Integer = 4 To m
        If d > 21 Then
          For j As Integer = 22 To d
            If Integer.Parse(j.ToString().Substring(1, 1)) > 1 Then
              Dim d10 As Integer = Integer.Parse(j.ToString().Substring(0, 1))
              Dim d1 As Integer = Integer.Parse(j.ToString().Substring(1, 1))
              If d1 * d10 = i Then ans += 1
            End If
          Next
        End If
      Next
    End If
    Console.WriteLine(ans.ToString())
  End Sub
End Class