c    @(#)kmlofq.f	1.1


      integer function kmlofq(q,zml,l)

      dimension zml(l)

      kmlofq=l
      do 2 k=l,1,-1
        if(q.le.-zml(k))kmlofq=k
    2 continue

      return
      end
