program main
  implicit none
  integer(8) i,M,D,ans,j
  read(*, *) M, D
  !read(*, *) (L(i), i = 1,N)
  ans = 0
  do i = 1,M
    do j = 1,D
      if (i == mod(j,10)*(j/10) .and. mod(j,10)>1 .and. j/10>1) then
        ans = ans + 1
        !write(*, *) i,j
      end if
    end do
  end do

  write(*, *) ans
end program main
