When you think of someone well into their 80s, images of chest presses and lat pulldowns probably aren’t the first things that come to mind.

But for Supreme Court justice and two-time cancer survivor Ruth Bader Ginsburg, these strength-building exercises are a huge reason she’s been able to stay so strong in her golden years.

And it’s potentially one reason she was able to get back to work so quickly after being released from the hospital earlier this week.

Ginsberg was hospitalized after falling and fracturing multiple ribs last week.

The 85-year-old hits the gym twice a week with her longtime personal trainer Bryant Johnson.

According to Johnson, she starts off with a quick warmup on the elliptical to get her blood flowing. From there, she moves into some light stretching before launching into a series of rotational and resistance exercises. Then, she finishes up with a cooldown and more stretching.

From leg extensions and leg curls to chest presses, squats, pushups, and planks, RBG’s workout is designed to cover the entire body — from the top of her head down to her toes.

“The only way, really, to improve on the bone density and muscle strength is doing weight-bearing exercises — and so, that’s what I actually have her doing,” Johnson, creator of The RBG Workout and wellness expert with The Vitamin Shoppe, told Healthline.

The fitness routine has helped Ginsburg improve her functionality and quality of life, Johnson said, even with simple tasks like sitting up and sitting down, balancing, stretching, and being able to pick things up.

As we age, our body fat percentage tends to increase as our bone density and muscle mass decline. After age 30, we lose about 3 to 5 percent of our muscle mass per decade, according to Harvard Medical School.

This age-related muscle loss — also known as sarcopenia — can hurt our overall strength, balance, and mobility, which can significantly increase our risk of falls and fractures.

Fortunately, though, just because you lose muscle mass as you age doesn’t mean you can’t rebuild it. In fact, research has proven that you can continue to increase muscle mass as you get older, which can ultimately help you retain strength and motor functions.

“With evidence like this, we know that it’s simply a matter of ‘use it or lose it’ and that with regular strength [and] resistance exercise, we can increase muscle mass at any age,” said Dr. Scott Kaiser, a family physician and geriatrician at Providence Saint John’s Health Center.

Regular resistance training, like the workout done by RBG, can be tremendously beneficial for older adults.

By targeting various muscles throughout the body — such as the hips, legs, core, and arms— and gradually increasing weights, reps, and sets over time, you can build muscle mass and strengthen your body.

“As losing muscle mass and strength can make it increasingly difficult for us to maintain our ability to function — and thereby present a significant threat to our independence — the importance of this type of exercise becomes all the more critical the older we get,” Kaiser said.

Physical activity should be part of a proactive strategy to prevent falls, health experts believe.

For one, strengthening our muscles can keep us upright and reduce the risk of falling. Furthermore, more robust muscles do a better job of protecting our bones should you experience a fall, Kaiser said.

The benefits of regular exercise don’t stop there. According to Kaiser, when it comes to healthy aging, exercise is the closest thing there is to a “miracle drug.”

It’s been associated with improved cognitive decline, improved sleep, reduced feelings of depression, and improvements in mood and overall well-being.

“Moreover, when it comes to managing and improving chronic conditions — like diabetes, high blood pressure, heart disease, and osteoporosis — exercise is the ‘best medicine,’” Kaiser added.

Yes, Ginsburg’s fitness regimen is impressive, but that doesn’t mean it’s necessarily the right workout for you. Before trying a new exercise, always talk to your healthcare provider and make sure they’re on board.

Johnson recommended finding something that works for you. Do yoga, dance, or go for a walk. Do something to get your body moving and your blood flowing.

If you can, work with a personal trainer who can coach you in the gym. If the gym intimidates you, do your exercises at home.

“The key is just doing something. If you like to walk, just start walking,” Johnson said.

There are tons of exercise options out there; you just have to start somewhere and then build up over time.

Wellness is about taking those small steps — consistently over time, day by day — to build strength and endurance and improve your overall quality of life.