The vitamin D from the sun’s rays is essential for the healthy functioning of our body and immune system, and staying in the shade all the time could be a recipe for a premature death, researchers from the Karolinksa University Hospital in Sweden have discovered.

They reckon that people who regularly sunbathe will live just over two years’ longer than someone who always avoids the sun. They based their estimate on a review of 29,518 Swedish women, aged between 24 and 64, whose levels of sun-exposure were tracked for 20 years.

Frequent sunbathers had a lower risk of developing heart disease or dying from any disease prematurely compared to those who avoided the sun. Non-smokers who avoided the sun had a similar life expectancy to smokers who had the highest exposure to the sun, suggesting that sun avoidance has a similar risk factor as smoking.

The researchers describe their findings as a “paradox”—but only if you think vitamin D is unimportant to our health.