Trekking in the Himalayas or the Andes is on many travelers’ bucket lists. A high-altitude trek is a fantastic experience — and, for many of us, the chance of a lifetime to see some of the world’s most awe-inspiring peaks. From a hike in Patagonia to a long-distance trek in the Dolomites, preparation for the high altitude is vital.

Altitude sickness, caused by the lack of adequate oxygen at higher elevations, can ruin your experience and dash dreams of reaching your goal. That said, your body can react to lower oxygen levels and adapt through acclimatization — but it’s vital to be as prepared as possible before you go. Here are a few steps you can take in preparation to help lower your chances of feeling the full effects of this health condition.

1. Do a reality check.

When people think about altitude, the usual places that spring to mind are the Nepalese trekking routes and Kilimanjaro. These are epic treks, but altitude impacts hiking at lower altitudes, too. In fact, you just need to top 1,500 meters, or about 5,000 feet, to be in the high-altitude zone. One of the first things to do is check the altitude of the area you are trekking through, so you are aware of the terrain and the challenges of hiking there. You must also check that your insurance policy covers high-altitude trekking because many standard policies treat it as an exclusion. A specialist insurance policy may be required.

2. Get fit before you go.

A high altitude trek is not a method of losing weight or getting fit. You need to be as fit as possible before you go. If you are not a regular at the gym, this needs to start at least two months ahead of your journey. If you aren’t used to regular exercise and head out to the high-altitude trekking routes, you can easily put your life in danger, as well as those of other people.

Start by planning out your exercise regime. Long walks are ideal, but be sure to lengthen them as you progress. If you are in an office all day, take the stairs in place of the elevator and walk around the block at breaks. All this helps build your cardiovascular strength. You will need to progress to walking with your pack and include visits to hilly terrain or a mountainous area at a lower altitude to the one you will be visiting.

You will need to add additional exercises to your fitness regime. Some of the best exercises for building cardiovascular strength include cycling, running, and swimming. Make sure you have a session or two using these forms of exercise each week to build your endurance.

If you need to lose weight, make a plan and stick to it. Reduce any sugar in your diet, and eat food rich in protein and vitamins to build your strength.

3. Book an appointment to see your doctor.

If you have not seen a doctor in a long time, you need to get a checkup before you leave. This includes a check of your blood pressure and general fitness. If you are female, get your hemoglobin checked as it may be low from menstruation, which can lead to problems at altitude. People with existing medical conditions such as asthma or diabetes should get checked out to ensure the medication is controlling the disorder effectively; a certification of fitness to travel might be required for some treks.

Your physician may write you a prescription for Diamox (Acetazolamide), a medication that boosts respiratory function by pushing the kidneys to excrete bicarbonate, a form of carbon dioxide. As a prophylactic, it can help prevent some of the most dangerous symptoms of altitude sickness. However, Diamox can have its own side effects, including dizziness or lightheadedness, which may be difficult to differentiate from altitude sickness itself — so be sure to discuss these with your physician.

4. Stay hydrated.

The thin air at high altitude causes a high loss of fluids through breathing. It is vital to stay hydrated when exercising and walking at altitude. Make sure you drink water often when exercising. Dehydration can lead to lethargy, accidents, and even death at higher elevations, so keep your fluids up when exercising.

When trekking at altitude, keeping your hands clean and avoiding illness is vital because illness will dehydrate you further and weaken you when walking. This is particularly important if you are camping, so wash your hands and use hand gel frequently.

5. Acclimate, acclimate, acclimate.

If you only take one step to prevent altitude sickness, this should be it. The rate of ascent is the single most important factor in deciding who gets sick and who doesn’t. Acclimating to the oxygen levels slowly is vital. Avoid climbing more than 1,000 feet per day and drink lots of water. When traveling from low to high altitude, opt to drive or go on foot rather than fly — the longer trip will give your body time to acclimate. If you must fly, spend at least 24 hours being completely lazy — sleep plenty and don’t do any strenuous activity.

6. Invest in the right gear.

While you might not think this directly contributes to the effects of altitude sickness, being comfortable and having the correct gear is vital. The stress of not having the proper equipment will put further strain on your mind and body. Hiking boots are probably the most important gear and must be broken in before you go to avoid blisters and sores. I always wear my hiking boots on the plane when traveling to the mountains. If my luggage is lost, I can replace most things easily, but a comfortable set of hiking boots is impossible.

Also, take a water bottle, a basic medical kit, and the correct clothing. Some trekking companies give a list of equipment to take, including the most appropriate type of sleeping bag. The mountains can be really cold at night, even in summer, so be prepared with layers, fleeces, and waterproof gear.

7. Study up on altitude sickness and know the signs.

Everyone with altitude sickness presents differently, but there are a few symptoms that are pretty much universal. It’s vital to learn the signs of altitude sickness both to recognize a problem with yourself and a fellow trekker. A headache, lethargy, and nausea are all signs of altitude sickness. Shortness of breath, a general feeling of malaise, and a loss of appetite may also occur. If these symptoms persist, you should descend to a lower altitude. Generally, people trekking should sleep at an altitude lower than the highest point they trekked that day to help acclimatization and to avoid sickness.