Energetics of snake locomotion