Want to know how to succeed as a tech entrepreneur? Strap in: it’s a long road to prosperity.

Every year, thousands of entrepreneurs start small businesses in the U.S., each with their own brilliant ideas. The failure rate statistics can be daunting, though. Only 80% of small businesses started in 2014 made it to the second year while only 56% made it to year number five, according to Small Business Trends.

Don’t let the numbers discourage you. While you may not become the next Jeff Bezos, plenty of tech startups flourish, even if they hit some rough patches along the way.

We’re sure you’re brimming with confidence and ready to get your startup off the ground. After all, you wouldn’t be an entrepreneur if you weren’t. But here are four traits that, if developed and sustained over the long haul, are essential on how to succeed as a tech entrepreneur:

1. Dedication

Entrepreneurs like yourself have plenty of reasons they want to start a company — everything from being their own boss, chasing riches, pursuing their passion, or just being plain curious about solving a hard problem.

A word to the wise: Know that launching a company takes guts, and it may take several years until you truly succeed. Tech startups face many obstacles along the way, so it’s important to continuously look at the big picture, even when there are roadblocks like insufficient cash flow, problems with personnel, or other thorny issues.

One of the most common entrepreneur mistakes is the illusion that success can somehow happen overnight. Remember that it takes time.

2. Flexibility

Most entrepreneurs start a company with a specific idea and game plan. But remember that markets quickly change. Your initial idea may not drive your core success; you have to be willing to adapt and stay flexible.

The most successful entrepreneurs are driven to solve problems, and they realize they may have to pivot along the way and tweak their approaches. One of the big entrepreneur mistakes is not being flexible enough.

One example of this is Twitter, which was started in 2005 as a podcast company known as Odeo. When Apple iTunes began to dominate the podcasting market, the original Twitter founders developed the 140-character status update side project that launched them into riches.

Lesson learned: have a plan, but be willing to pivot to meet customer needs or when big obstacles get in the way. That’s a good formula for how to succeed as a tech entrepreneur.

3. Confidence

As a startup business owner, you’re going to spend a lot of time trying to convince people like investors, a tech entrepreneur partner, and employees. That means you’re going to have to exude a natural confidence. If you want to know how to succeed as a tech entrepreneur, remember that confidence is key.

The best way to build confidence is to work on projects you’re passionate about and invest the long hours to prepare to make your pitches.

Another tip: don’t look too much for external validation. As cliché as that might sound, successful tech entrepreneurs know that the long road to prosperity will involve rejection, difficult situations, and selling people on projects and ideas that may not garner approval right away.

4. Open-minded

One of the best tips for entrepreneurs: build a diverse team.

Don’t surround yourself and take advice from too many people who are just like you. That includes demographics and traits across the board, such as age, gender, educational background, and professional experience.

When entrepreneurs get too stuck in their own cultural biases, they may miss ideas and opportunities that can lead to success. Listening to competing ideas can be difficult, but the creative tension will usually yield insights that you may not have thought about before.