Kasper Rørsted landed his dream job a year ago as of CEO Adidas Group.

To get there however, Rørsted had to learn from his career’s worst setback: Getting fired from Hewlett-Packard back in 2004.

“I was 42 years old and I was responsible for 40,000 employees. I had a [very successful] career up until that point. It was a giant failure,” Rørsted said in an interview with Swedish magazine Di Weekend.

What got him fired was his “bad attitude,” the Danish executive says.

Rørsted had joined HP when the tech giant had acquired Compaq – his previous employer – but ultimately struggled to adapt to a very different company culture.

“All my numbers were great, and therefore I thought I could act however I wanted to. But I couldn’t.”

From that failure, he eventually gained his career’s most important lesson: To have a more humble approach with regards to organizational change.

“It undoubtedly made me a better leader,” the 55-year old told Di Weekend.

In his next job, as CEO of consumer good giant Henkel, Rørsted says this lesson helped him ride out the 2008 financial crisis and ensuing layoffs.

“You can always change a company, but you need to do it from the inside and in a constructive way. When I later enacted enormous changes at Henkel, I did it in a less confrontative way.”

Kasper Rørsted also opened up about his priorities with Adidas: to quadruple e-commerce revenues by 2020, challenge Nike in the United States, and get more women to join the company’s male-dominated management team.

To make those changes happen, Rørsted will surely draw from his most painful lesson.

This article originally appeared in Business Insider.