  Bestvina and Mess [BM] proved a remarkable formula for torsion free
hyperbolic groups $$ \dim_L\partial\Gamma=cd_L\Gamma-1 $$ connecting the
cohomological dimension of a group $\Gamma$ with the cohomological dimension of
its boundary $\partial\Gamma$. In [Be] Bestvina introduced a notion of
$\sZ$-structure on a discrete group and noticed that his formula holds true for
all torsion free groups with $\sZ$-structure. Bestvina's notion of
$\sZ$-structure can be extended to groups containing torsion by replacing the
covering space action in the definition by the geometric action. Though the
Bestvina-Mess formula trivially is not valid for groups with torsion, we show
that it still holds in the following modified form: {\it The cohomological
dimension of a $\sZ$-boundary of a group $\Gamma$ equals its global
cohomological dimension for every PID $L$ as the coefficient group} $$
\dim_L\partial\Gamma=gcd_L(\partial\Gamma). $$ Using this formula we show that
the cohomological dimension of the boundary $\dim_{L}\partial\Gamma$ is a
quasi-isometry invariant of a group.
