One of the first lessons an athlete learns is that competition is as much a mental challenge as it is a physical one. And of all the training former gymnast and Olympic gold medalist Shannon Miller received during her career, it’s this one she credits with helping her best her biggest opponent to date: cancer.

In 2011, 15 years after Miller helped the USA win its first women’s gymnastic team competition at the 1996 summer games in Atlanta, Georgia, her doctor found a baseball-sized cyst on one of her ovaries during a routine exam, and she was diagnosed with a rare form of ovarian cancer. At the time, she was 34 and a new mom to a one-year-old son.

Harder still, the discovery came just three years after her mother received her own cancer diagnosis, which offered the fitness pro her “first real glimpse into how cancer affects a person and their family,” says Miller. She sought treatment, which involved undergoing surgery to remove one of her ovaries and fallopian tubes and aggressive chemo. Six years later, she’s cancer free and is now an advocate for women’s wellness, as well as the author of It’s Not About Perfect: Competing for my Country and Fighting for my Life.

So what’s one piece of advice she offers to other women facing similar odds? Never underestimate the power of positive thinking: “I relied on that competitive mentality to help me during some of the most difficult parts of treatment and recovery. You rely on perseverance, a positive attitude, and teamwork—I knew that it wasn’t about the stumbles as much as about the importance of getting back up.” In short, it’s what she calls her will to not only survive, but thrive.