Energy Spectrum of Shock-Accelerated Particles