We’ve all heard the stories about the amazing centenarians who remain spry well beyond their years. What’s their secret? Their daily constitutionals? Their teetotaling disdain for a drink or a smoke?

Well, a new study released Wednesday indicates, surprisingly, that people who live into their 90s and longer have habits just as lousy as the rest of us.

Nir Barzilai of the Albert Einstein College of Medicine and colleagues interviewed 477 Ashkenazi Jews who were living independently even though they were at least 95 years old. Some were as old as 112. They all joined the Longevity Genes Project, which is investigating why centenarians live so long.

The researchers quizzed the subjects about their lifestyles, including whether they drank alcohol, smoked tobacco, exercised and what they ate. The scientists then compared what they found to data collected from 3,164 people who had been born around the same time who underwent similar examinations as part of a long-running federal health survey.

Overall, the old-timers were no more or less likely to make heathier choices. They smoked just as much, imbibed as often and were no less likely to be couch potatoes, the researchers reported in a paper published online by the Journal of the American Geriatrics Society.

In fact, in some cases, they lived more slovenly lives. For example, only about 43 percent of the men who lived to be at least 100 exercised regularly, compared to 57 percent of the regular folks, the researchers reported.

The findings indicate that genes play a much more dominant role in making people live the longest than does anything else, including how well we take care of ourselves, the researchers said.

“It’s clear that in this population the environment plays really very little role,” Barzilai said in a video released with the study. “What they have is some genetic protection against the environment... They have genes that are protecting them from the bad effects of the environment.”

Barzilai stressed, however, that for people who aren’t lucky enough to be born into a family that tends to live long should still try to have a clean life. Many studies have shown that does help people live longer, healthier lives. And those who come from long-lived families should also still try to have maintain healthy habits.

“If you also are in a family that does have longevity I wouldn’t suggest that you stop exercising or do anything other than that because we still have to determine whether everyone inherits those genetic traits,” Barzilai said.