By Dr. Brian McDonough, Medical Editor

PHILADELPHIA (CBS) – Malignant melanoma is the fifth most common type of skin cancer in the United States. Of course the greatest way to reduce your risk of melanoma is to avoid the sun’s dangerous rays but a study from the National Cancer Institute has a somewhat surprising way to avoid the problem: reach out for a cup of joe.

The study of over a half million older adults had them fill out surveys about diets including coffee intake. Drinking caffeinated coffee was associated with a lower risk of malignant melanoma.

Specifically, people who drank four or more cups per day had a twenty percent lower risk.

One theory is that coffee protects against cancer by protecting against DNA damage.

Of course there are downsides to coffee including headaches, dehydration and difficulty sleeping.