program kadai
   implicit none
    integer  ::  M,D
    integer  ::  dd(2)
integer  ::  num,i,j,k


read(*,*) M,D

if(D<22) then
    write(*,*) 0
    stop
end if

!write(*,*) M,D,dd(1),dd(2)

num=0
do i=1,M
    do j=22,D
        dd(1)=j-(j/10)*10
        dd(2)=j/10
        write(*,*) dd(2),dd(1)
        if (dd(1)>1 .and. dd(1)*dd(2)==i) then
            num=num+1
        end if
    end do
end do

write(*,*) num


stop
contains


end program kadai