Dealing with getting fired is hard, especially if you’re just starting your career. But getting fired twice before you’re 30 can feel like a double whammy of bad luck.

If you find yourself in a similar situation, you can feel at peace knowing that Sarah Robb O’Hagan, CEO of Flywheel Sports, found herself in that position not too long ago. She was first fired from the lead marketing position at Virgin Atlantic Airways on the grounds that she was “too cocky.” The second time was during her tenure in Atari‘s marketing department.

Instead of letting those experiences hold her back, O’Hagan’s career has continued to thrive.

Since those roles, O’Hagan has served as president of Gatorade and president of Equinox before moving on to lead Flywheel Sports. During an interview with Pattie Sellers at Fortune‘s Most Powerful Women Next Gen Summit, O’Hagan said that her negative experiences were crucial in helping her find positive ones.

“Early in your career, you think you’re in this place that isn’t you,” O’Hagan said at the summit, according to Fortune. When referencing her past experience at Atari, she joked, “I didn’t even like video games.”

O’Hagan believes that your seemingly random experiences give you a great knowledge base to build the rest of your career. But ultimately, being fired twice also taught O’Hagan to pick something that you care about, and pursue it.

“I had a huge amount of perseverance that contributed to my own personal interests and turned them into areas of deep passion,” O’Hagan wrote on LinkedIn. “While I absolutely love all of the work that I get to do these days — and have done for pretty Read More Here