Magnitude and Energy of Earthquakes