      function nsfun(nla,nd) ! copyright, bernd berg, june 11, 1999.
c calculates number of lattice sites ns from edges nla(1:nd).
      dimension nla(nd)
      nsfun=1
      do id=1,nd
        nsfun=nsfun*nla(id)
      end do
      return
      end
