Computing the maximum transient energy growth