Dan Schoenbaum is the CEO of Redbooth.

I grew up in the United States, but volunteered to spend two and a half years in one of Israel’s toughest military units.

Joining the military was never a thought that had crossed my mind, until – during college – I came across a review of a book called “A Purity of Arms.” Something about the book resonated with me and I found myself passionate about the opportunity to join the Army and try to be a part of a small, elite group.

I was curiously drawn to the seemingly impossible challenges described in the book. This is how I got on the path of becoming a sergeant in the paratroopers, serving as a sniper for the entire battalion.

I arrived in Israel, with no friends or family for support. I didn’t know more than a few words of Hebrew. Within six months, I was fluent, and after spending two years enduring grueling physical challenges and learning to work with diverse teams under pressure, I emerged a changed person and walked away with a strong set of valuable, lifelong leadership skills.

These vital lessons learned during my time in Israel have shaped the person I am today as well as the leadership approach I take with all teams I manage. These are the five key lessons I learned as a result of this incredible opportunity:

You have to earn it

When a soldier enters a combat unit in the Israeli military, he has nothing. A lot of hard work and effort go toward earning every single piece of equipment through a series of physical challenges, culminating in an 80-mile march to earn the unit’s beret. Each task seems difficult–if not impossible–at first.

There were days when I thought that I might not be able to finish, but each time I did– even if I needed a fellow soldier to physically push or pull me the last mile. This approach allowed me to build up confidence in myself and my unit.

he lesson I took away from this is that you can push your boundaries to overcome difficult challenges. And by doing so, you will develop a strong sense that you can accomplish anything that you put your mind to—a virtuous cycle.

Teaming to “take that hill”

In the army, we were just a bunch of guys with guns until we had a mission with clear goals from our commanders. Our leaders would tell us “what hill to take,” but would not tell us how to get there – that was always up to us.

Commanders consistently encouraged us to work as a team to make the best possible decisions together to accomplish our goal. I learned to be my teams’ biggest advocate and supporter, and give them room to grow and fail. We were taught to study our mistakes so we learned as individuals and teams what happened, how to do things differently and avoid making the same mistakes again.

In the end, it was important to lead my teams based on simple, strategic goals and give them the confidence to trust their abilities, and the space in which to succeed.

Leaders need to be generalists not specialists

Effective leaders are generalists who hire outstanding specialists. Nobody can be an expert in everything; but you need to learn just enough of everything to manage your team and step in if needed.

Just like in sports, where the best coaches need to understand every position on the field, effective leaders need to cross-train to understand all areas of the business. You may be a specialist at one thing, but knowing what others do around you (and how to do it, too) is vital.

The way I view this in a business setting is: instead of spending your entire career working in the marketing department, spend some time working in sales, business development and then move back into the marketing group. This will give you a much wider, richer view of all aspects of the business, allowing you to approach your job from a broader perspective.

Get your hands dirty

The military experience most people undergo in Israel has an immeasurable impact on the lives of everyone in that small country. All men must serve at least three years, and women serve two years.

The experience is challenging and profound– everyone leaves with lessons learned that cannot be found in any Ivy League institution. I worked side-by-side with men and women that exuded a sense of leadership and confidence that have been hard to find elsewhere.

No job was too small for anyone. Commanders, Officers and Sergeants were getting dirty, sleeping in tents, leading marches. If we were cold, wet and sleepless, they were too. That approach built instant and enduring respect with the teams and instilled in me the belief that you don’t ask someone on your team to do something that you wouldn’t do yourself.

More often than not, doing something together as a team has much stronger results and helps cement a strong overall team dynamic.

Get knocked down 5 times, get back up 6

The biggest lesson I learned was that you can accomplish anything you put your mind to. If a door is slammed in your face, figure out how to solve the problem to get through it.

While in the military, we knew we would have to march 80 miles to earn our green beret. Early on, everyone on the team said it would be impossible. But as you go through the training, the leaders build you up to have the confidence to wholeheartedly believe it can be done. Through that experience, we learned to stay focused and persevere.

In a business setting, we often see colleagues hit a wall and give up on a project or goal, but with a little courage and guidance, a good leader can help them gain the confidence they need to try again and succeed. I try to lead all my teams in a way that allows them to fail, but requires them to learn from each failure.

If I had to sum up my experience in one sentence, I’d have to say it was learning how much can be accomplished when everyone acknowledges and recognizes the support of the team around them, for without your team, you are nothing.

Teamwork is required, even in the loneliest of roles. While you may not have the opportunity to spend time in a tough combat unit, I hope that by sharing some of my most valuable lessons, I can help instill and develop a stronger inner leader in you.

I’d love to hear your personal experiences implementing these and similar ideas either by email or on the comments below.

Read next: Why European startups shouldn't fundraise in the Silicon Valley