program t
  implicit none
  integer :: M,D,i,j,ct

  read(*,*) M,D

  ct=0
  do i=1,D
     if((mod(i,10).ne.1).and.(i/10.ne.1)) then
        j=mod(i,10)*(i/10)
        if((j.gt.M)) then
        else
           if(j.gt.0) then
!              write(*,*) i,j                                                   
              ct=ct+1
           endif
        endif
     else

     endif

  enddo
  write(*,'(i0)') ct


end program t
