You’re a startup, and all of a sudden you find yourself running out of cash. What do you do next?

Take an example from Ben Horowitz: Go hard or go home.

Horowitz, now better known as the cofounder of Silicon Valley’s most famous VC firm, is the poster child for how to run hard in the face of failure. When Horowitz founded the hosting service Loudcloud in 1999, the business was a fast winner. Not only did blue-chip companies like Ford and Nike sign up, but Horowitz took the company public less than two years later.

The very next year, Horowitz gutted Loudcloud and rebuilt it as something completely different: Opsware, an enterprise software company. It seemed insane at the time, but five years later, he sold the company to Hewlett-Packard for $1.6 billion. Horowitz was staring down a company future where he felt no money lay. He reacted quickly and decisively. There were times when he only had a few more months of cash left in the bank, but he didn’t let off the throttle.

Horowitz was acting as every good entrepreneur should. Instead of watching the market eat his pie, he and his team tore the floundering business apart, cashed in on the pieces, and built something better. He could have gone home, but instead, he pushed even harder.

In the cutthroat world of tech startups, that’s the best way to win.

Don’t Be Afraid to Slay Your Golden Calf

“Unlike most places in the world where public failure could ruin your career, destroy a family, or even bring risk of death from shame … in Silicon Valley, everyone is all too comfortable openly discussing their failure(s),” writes Dave McClure, the super-angel behind 500 Startups. “While this is generally a good thing – most people won’t learn how to stretch themselves unless they push the boundaries of potential failure – a far greater fear for many entrepreneurs is that of unsustainable success.”

When you ask entrepreneurs how their business is doing, they almost always tell a fairy tale story. They have to be positive. They have to believe they can succeed. When their business meets an untimely demise, they may be open to discussing their failures, but while the ship is crashing, entrepreneurs are generally all smiles and excitement when you talk to them.Failing effectively can in fact lead to sustainable success in the future. The right way to fail is to do so going 100 mph. Making concessions until you drown is generally the worst option for your business and everyone in it. A slow demise weakens your resolve, harms your reputation, and even foreshadows the companies you haven’t started yet.

If you want to succeed despite mountainous odds, the best thing you can do is keep pushing and considering every possible move you can make, even if the odds are engulfing you in what Horowitz terms The Struggle. Do whatever it takes to execute against your growth projections before you run out of cash, even if it means rebuilding the product or taking a down round of funding. Worst case, you run your business dry giving it your all.

The Logic Behind Running Your Business Off a Cliff

Going hard as you approach $0 left in the bank might seem foolish, but remember, this is a startup we’re talking about, not a retirement fund. If all that cash you’re burning is leading to a better product-market fit, growing market share, or some success factor, you increase your chances of landing new funding. If your B round happens to land when you only have $17 left in the bank, so be it — you live to fight another day!

Your coffers still might run dry without a last-second cash infusion. If that is the case, aim to at least earn the respect of your investors. They know that failure is one of the natural consequences of being an entrepreneur. One VC once told me that if they make 12 investments of $100K a year, they expect 11 of those investments to fail. If your startup is poised to become one of the casualties, run it hard so that you can learn from the experiment and walk away having given it everything you have.

The alternative is to float your startup in its existing business model as long as possible, maybe eeking out a side job to win the day. That’s like burning your bridge rather than jumping off it. Investors respect courage — prove to them again why they trusted you with their dollars. If this company doesn’t succeed, at least show your mettle for the next one.

What About Employees?

In my case I’ve hired and fired a lot in my pursuit of excellent employees. They are hard to come by, and I fight to keep them around. They are one of the driving forces pushing me to succeed. I’ve hired some of the best people I know.

Given my passion for my employees and knowing the tenuous situation I hired them into, I give them every growth opportunity possible. I encourage daily continuing education and additional skill set development. As you stare down the possibility of a flat lined bank account, having invested serious time and resources in your employees may be all you can give them. Even if you fail, they will be better for having joined your team.

Don’t think these people are expendable! They believed in you when you might not have believed in you. They deserve the best treatment you can muster. Horowitz recommends that if you have to do layoffs to keep the company alive, then do them personally. Your employees deserve at least that much from you. You can’t cower in your office while the people you fought for exit the building.

Sprinting With an Eye on the Horizon

Bottom line, six months of cash could mean anything in terms of the future of your company.

While it’s natural to panic, the most effective thing to do is push forward, perspicaciously seeking every opportunity to pivot while there is still money in your bank account. Figure out aggressive ways to create value for your company. If they all fail and the company falls apart, you’ll still have won the respect of your community of workers and investors. You’ve gained the experience and social equity you need in order to make that next startup succeed sustainably.

Horowitz took his company public during the 2001 tech boom, with only six weeks of cash left in the bank. He has likened running a startup to “playing three-dimensional chess on Star Trek, there is always a move.”

And that’s something entrepreneurs should never forget.

Jordan Wright is the cofounder and CEO of Comfy, an Austin-headquartered startup connect college students to off-campus housing.