Last updated: Jun 22, 2016

One of the keys to saving money on your health care is to avoid getting sick in the first place. An ounce of smart prevention can save you what you’d spend on cures. And if you do develop a serious medical condition, you’ll keep your annual out-of-pocket costs in check if you pay attention to what your doctor orders. Follow these four steps to save.

Take your best shot

A 2007 study put lost earnings from the flu at $16.3 billion a year. Between 5% and 20% of the U.S. population comes down with the flu each year, reports the Centers for Disease Control and Prevention. If you’re in that group, you’ll probably miss up to five days of work. You can get an annual free flu shot from an in-network health care provider; plus schools and companies often offer them at no cost.  

Be smart about tests

Preventive care is covered by insurance with no cost sharing. There’s a debate, though, about whether the harms of some screening outweigh the benefits. Talk to your doctor, but these seven tests are likely a net positive, says Wanda Filer, a family physician and president of the American Academy of Family Physicians: All adults should be screened for high blood pressure, depression, alcohol misuse, HIV (ages 18 to 65), and cholesterol (starting at 35 for men, 45 for women at risk of heart disease). Diabetes, for people 40 to 70 who are overweight. A hepatitis C test is recommended if you were born between 1945 and 1965.

Make this a habit

One of the best ways to avoid getting sick doesn’t cost a dime: Wash your hands (for 20 seconds, says the CDC). Handwashing cuts respiratory illnesses like colds by 21%, a published review found. No sink nearby? Use alcohol-based hand sanitizer.  

Follow doctor’s orders

When you have a chronic condition such as diabetes or heart disease, the amount you’ll spend on doctor visits and prescriptions adds up. Heeding doctors’ orders not only can keep you healthier, but can also improve your cash flow.

A 65-year-old diabetic who follows her doctor’s treatment plan will pay 13% less in health care costs at age 75 than her less compliant peers, according to HealthView Services, a Danvers, Mass., company that provides retirement health care cost data and tools to financial advisers. For a 65-year-old with heart disease, the cost gap at age 75 between diligent and not-so-diligent patients is 7%.

“If we make minor changes in lifestyle, we can significantly reduce health care costs, both pre-retirement and in retirement,” says HealthView Services founder and CEO Ron Mastrogiovanni.

Prevention is always the best money saver, and the CDC lists community-based diabetes prevention programs at cdc.gov. Costs vary and may be covered by insurance.

Successful management of Type 2 diabetes often involves taking insulin, exercising, monitoring your blood sugar levels, and regulating the amount of carbs and sweets in your diet. For those with diabetes, Medicare covers medical nutrition therapy, as do many private insurance plans.

RELATED: The Best Free Health and Fitness Apps

To ward off heart disease, embrace a healthy lifestyle—diet, exercise, no smoking. The American Heart Association has tips at heart.org. When you have heart disease, the key is to take your medications as directed, even if you feel fine.

This article originally appeared on Money.com and is part of a series on how getting fit and healthy can boost your bottom line.