The research raised questions, given that consistently wearing sunscreen is one of the most common pieces of advice from physicians. Should the risk of vitamin D deficiency — which can lead to brittle bones and has been associated with insulin resistance, high blood pressure and decreased immune function, among other issues — overshadow years of that advice?

Not according to Dr. Victoria Werth, a professor of dermatology and medicine at the University of Pennsylvania who is certified in both dermatology and internal medicine. “I think we are too worried about vitamin D,” Werth says. “The risk of skin cancer is so much greater than low vitamin D.”

Skin cancer is the most common form of cancer in the United States, according to the Centers for Disease Control and Prevention (CDC). In 2014, the most recent year with conclusive data, more than 76,000 people were diagnosed with melanoma, the most deadly form of skin cancer. (The CDC does not track other types of skin cancer, such as basal and squamous cell carcinomas.)

Given how common it is, Werth says that preventing skin cancer should take priority over protecting against vitamin D deficiency, especially since it’s possible to get some vitamin D from food (such as fish, egg yolks, mushrooms and fortified foods) and supplements. Plus, she says it’s a myth that wearing sunscreen totally stops the absorption of vitamin D from sunlight.

“On the order of 2% to 7% of light gets through, depending on the SPF of the sunscreen,” Werth says. “If people use an SPF 15 sunscreen, then only 93% of the rays are blocked, and enough sun can get through to provide enough vitamin D.”

Spending about an hour per day in the midday sun while wearing SPF 15 would likely be enough to get vitamin D levels to a healthy range, she says. If you’re going sunscreen-free, it only takes about 10 minutes — give or take a bit, depending on how dark your skin is — to get enough.