Magnitude of energy released by an earthquake is calculated using ?