  We derive expressions for the time integrated spectrum of Cosmic Rays (CRs)
that are accelerated in a decelerating relativistic shock wave and escape ahead
of the shock. It is assumed that at any given time the CRs have a power law
form, carry a constant fraction of the energy E_tot of the shocked plasma, and
escape continuously at the maximal energy attainable. The spectrum of escaping
particles is highly sensitive to the instantaneous spectral index due to the
fact that the minimal energy, E_min ~ \Gamma^2 m_pc^2 where \Gamma is the shock
Lorentz factor, changes with time. In particular, the escaping spectrum may be
considerably harder than the canonical N(E)\propto E^-2 spectrum. For a shock
expanding into a plasma of density n, a spectral break is expected at the
maximal energy attainable at the transition to non relativistic velocities, E ~
10^19 (\epsilon_B/0.1)(n/1 cm^-3)^(1/6)(E_tot/10^51 erg)^(1/3) eV where
\epsilon_B is the fraction of the energy flux carried by the magnetic field. If
ultra-high energy CRs are generated in decelerating relativistic blast waves
arising from the explosion of stellar mass objects, their generation spectrum
may therefore be different than the canonical N(E)\propto E^-2.
