Macronutrient optimization and energy maximization determine diets of brown bears