They say that the number one reason people leave their jobs is their managerbut according to Mark Cuban, disliking your boss can actually be a boon.

The serial entrepreneur and Shark Tank star had some brutal news for people struggling with their managers, telling them they need to learn from their bosss mistakes instead of throwing in the towel.

Speaking to entrepreneur and VC Randall Kaplan on the In Search of Excellence podcast, Cuban recounted the explosive relationship he had with a boss early on in his career at Mellon Bank in the 1980s.

Explaining the pair had disagreed over Cubans proactive nature, the Dallas Mavericks owner said it taught him a great deal about how not to behave, a key skill for aspiring managers and entrepreneurs.

Cuban acknowledged it can be tough if you dont like your boss but said disgruntled employees needed to reframe the situation as a learning moment, grit their teeth, and get on with it.

Theres two things to consider. One is always realize youre a free agent, youre allowed to look for your next job while youre in your current job, the Cost Plus Drugs founder began.

But more importantlyand this particularly applies to your first jobis that in college you paid to learn but now that youve graduated youre getting paid to learn. Take advantage of the to learn part of it.

Thats where people who are in jobs they dont like make a mistake. Theyre so miserable they just cant wait to get out and they dont realize that you can learn more from the jobs you dont like than the jobs you do like.

Learning what not to do is just as critically as important as learning what to doparticularly if you have any aspirations to go on to management or to launch a company.

He added that at the jobs and companies which hadnt worked out for him, hed learned as much, if not more than the employers where hed had a positive experience.

Cuban said working a job you dont like is like attending a class at school you dont enjoy: If you really make an effort to learn, not just Im an accountant, Im counting rolls of carpet for an audit but ask How is the company run? How are managers managing? If I dont like my boss, why? Is there a way I can communicate with that boss that makes me better at communicating?

Learn from what theyre doing so you dont do the same when you become a boss.

Early on in careers it can be hard to have that perspective, Cuban added, but said: Look at your ultimate goal and within the context of that ultimate goal, what can you learn for your current set of circumstances?

The main trait of successful people

The shark famously has an eye for talent, and said theres one thing that stands out in successful people that the rest dont have.

The one thing in life you can control is your effort, the man worth $6.6 billion according to Bloombergs Billionaires Index said. And being willing to do so is a huge competitive advantage, because most people dont.

Effort isnt just simply turning up on time, Cuban says, its proactively problem solving and going above and beyond your role requirements.

Theres some people, or employees, that if you tell them to do A, B, and C, theyll do A, B, and C and not know that D, E, and F exists, Cuban explained. There [are] others who arent very good at details: If you tell them to do A, B, and C, all they want to do is talk about D, E and F.

If theyre not willing to put in the work? Dont apply for a job with me, Cuban said.