  A Herman-Avila-Bochi type formula is obtained for the average sum of the top
d Lyapunov exponents over a one-parameter family of G-cocycles, where G is the
group that leaves a certain, non-degenerate hermitian form of signature (c,d)
invariant. The generic example of such a group is the pseudo-unitary group
U(c,d) or in the case c=d, the hermitian-symplectic group HSp(2d) which
naturally appears for cocycles related to Schr\"odinger operators. In the case
d=1, the formula for HSp(2d) cocycles reduces to the Herman-Avila-Bochi formula
for SL(2,R) cocycles.
