Proper hydration and nutrition are key to achieving peak performance in any form of physical activity. You can be in excellent shape, but without enough energy you won’t be able to run your personal best time or distance. Energy is drawn from glycogen, which is stored in the muscles and acquired via foods that are high in carbohydrates. Consuming small meals that are high in carbohydrates prior to running, then, can help sustain energy levels for runs of about 90 minutes or less.

Marathon runners naturally need more carbohydrates than those running shorter distances to keep their glycogen stores at a high level. This is why they follow a “carb loading” diet in the weeks leading up to a big race. Generally, marathon runners begin loading up on carbs within six weeks of the race and will consume as much as 600 grams of carbs per day.

Timing is also important. Loading up on carbs by eating a massive serving of spaghetti isn’t ideal in the hours before a race. Instead, aim to consume a small snack with enough carbs to provide an energy boost during the run. This is true even for marathon runners. Finally, you’ll also need to refuel following a lengthy race. Below are five ideal foods to eat before, during, and after a run.

Before: Bagel and Peanut Butter

You will likely have enough energy in the morning to forego eating breakfast before starting a short run. However, eating a small meal like a bagel (or banana) and peanut butter can help provide additional fuel. Both bagels and bananas are high in carbs and are also easy to digest, so they won’t leave you feeling bloated and heavy during your run.

Peanut butter is also a good choice for many reasons. It is quick and easy to consume and provides a source of protein as well as carbs, fiber, and unsaturated fats. It is also relatively easily digestible and keeps you feeling full for longer relative to high-carb snacks. This is because peanuts have a low glycemic index, meaning they slowly release carbs into the bloodstream at a steady rate.

Other foods that have a low glycemic index include green vegetables, legumes, and most fruits. Bananas and bagels have a medium glycemic index. You should eat about 90 minutes before your run.

After: Beet Salad

Regardless of your fitness goals, you need to consume ample amounts of carbs before a run to ensure you have enough energy. What you should eat after a run, however, depends on what you want to achieve. You’ll want to consume high-protein meals if you’re looking to bulk up and add muscle, but you’ll want to eat low-calorie meals if you’re trying to lose weight.

A beet salad is one of the best options if your goal is to lose weight. Beets are packed with nutrients and low in calories. A 3.5-ounch serving of cooked beetroot, for instance, is only 44 calories and contains more than 5 percent of the recommended daily intake for vitamin C, folate, magnesium, potassium, and manganese.

Beets are also associated with physical health benefits such as lowering blood pressure, fighting inflammation, and improving digestive health. Studies have also shown they may enhance athletic performance for endurance athletes.

Top a spinach and arugula salad with cooked beet cubes, goat cheese crumbles, and balsamic vinegar. Spinach and arugula have similar properties to beets and have been shown to delay running fatigue. You can add a hard-boiled egg or chickpeas to the salad if you’re looking to increase your protein intake.

Before: Oatmeal Raisin Energy Bites

Oatmeal is another great pre-run option, but it isn’t always the most satisfying meal. Consider oatmeal raisin energy bites as a tastier alternative. Moreover, they are easy to make and have ingredients that provide other health benefits.

Place the following ingredients into a food processor: California raisins, old-fashioned oats, walnuts, ground flaxseed, cinnamon, and natural peanut butter. From there, form balls out of the mixture and store in the fridge. Eat one or two 90 minutes before a run. You can even eat them during longer runs to maintain energy levels.

After: Whey Protein Shake

Drink a whey protein shake after a run if your goal is to build muscle. Studies have shown whey is a more effective protein supplement than other alternatives like casein or soy. Moreover, whey protein has more essential amino acids. You can blend the protein powder with water or use milk to increase your protein intake.

During: Sports Drinks or Bananas

You’ll need to consume real food or energy gels during longer runs to maintain your energy levels. Sports gels and chews are effective as these fast-digesting sugars provide a slow release of carbs. Sports drinks are also ideal as they not only replenish lost glucose but also keep you hydrated. Bananas, grapes, and raisins are also among the light and easy-to-digest food options.