  The most general theory of gravity in d-dimensions which leads to second
order field equations for the metric has [(d-1)/2] free parameters. It is shown
that requiring the theory to have the maximum possible number of degrees of
freedom, fixes these parameters in terms of the gravitational and the
cosmological constants. In odd dimensions, the Lagrangian is a Chern-Simons
form for the (A)dS or Poincare groups. In even dimensions, the action has a
Born-Infeld-like form. Torsion may occur explicitly in the Lagrangian in the
parity-odd sector and the torsional pieces respect local (A)dS symmetry for
d=4k-1 only. These torsional Lagrangians are related to the Chern-Pontryagin
characters for the (A)dS group. The additional coefficients in front of these
new terms in the Lagrangian are shown to be quantized.
