Imagine a glass bottle with its base pointed toward a light. If you put half a dozen bees and flies into the bottle, which species would find their way out first?

Most people assume the answer is bees. After all, bees are known for their intelligence. They can learn highly complex tasks—such as lifting or sliding a cap to access a sugar solution in a lab—and teach what they learned to other bees.

But when it comes to finding their way out of the bottle, the bees’ intelligence gets in their way. The bees love the light: They’ll keep bumping up against the base of the bottle—located at the light source—until they die of exhaustion or hunger. In contrast, the flies disregard “the call of the light,” as Maurice Maeterlinck writes in The Life of the Bee. They “flutter wildly hither and thither” until they stumble upon the opening at the other end of the bottle that restores their liberty.

In life, most of us have been conditioned to act like bees—we set a goal and try to achieve that goal. Growing up, we studied for a grade, a win on the field, or the approval of our teacher, parents, or coach. As adults, we set sales targets and revenue goals; we look for promotions and pay bumps; and we swipe right and left in search of the perfect partner.

But the more we chase outcomes, the more outcomes act like mercury—slippery and elusive. The desire for a specific outcome can weigh us down and handicap us. Like the bees, we become blinded by the light.

If I try to write articles with the goal of making them go “viral,” I inevitably fail. I end up aiming for the lowest common denominator and chasing the illusion of mass likeability. My writing suffers as a result.

If I step onto the stage to give a keynote with the goal of pleasing everyone in the audience, I cave under pressure, become awkward, and begin stumbling over my words. It’s only when I forget about the outcome and focus instead on the process of writing or speaking that I end up producing quality work (and have a lot more fun while I’m at it).

With an output-focused approach, success is the goal. With an input-focused approach, success is a consequence. The psychiatrist Viktor Frankl, who wrote one of my favorite books of all time, said it best: “Don’t aim at success—the more you aim at it and make it a target, the more you are going to miss it. Success will follow you precisely because you had forgotten to think of it.”

Consider juggling. Contrary to popular wisdom, juggling isn’t about catching the ball. As Seth Godin explains, juggling is more about throwing the ball. But most beginners are too hung up on avoiding failure. They lunge back and forth and twist themselves into awkward positions, all to avoid dropping the ball. Their focus instead should be on the inputs, not the output. “If you throw well,” Godin says, “the catches will take care of themselves.” By taking the pressure off of the outcome, you get better at your craft.

Focusing on inputs has another upside: You avoid the wild swings of misery and euphoria that come with chasing outcomes. “Desire,” as entrepreneur Naval Ravikant put it, “is a contract you make with yourself to be unhappy until you get what you want.” You end up like the hard-working bees who zero in on the seemingly obvious exit that is ultimately their undoing.

With an input-focused mindset, you’re free to change your destination. Goals can help you focus, but that focus can turn into tunnel vision if you refuse to budge or pivot from your initial path like bees bumping up against the base of the bottle. You might set out to develop high-blood pressure medication, but pivot to curing erectile dysfunction when the participants in the clinical trials report a strange side effect (as Pfizer did with Viagra).

The best paths in life often aren’t the most obvious ones. It’s only when we give ourselves permission to fly to the edges and explore the peripheries that we end up finding the best path forward.