      FUNCTION TOTV(X,N)
C
C  TOTAL OF N VALUES IN ARRAY X
      DIMENSION X(N)
      IF(N.EQ.1)THEN
          TOT=X(1)
          GO TO 20
          ENDIF
      XA=0.
      DO 10 I=1,N
   10 XA=XA+X(I)
      TOT=XA
   20 CONTINUE
      TOTV=TOT
      RETURN
      END
