The new HBO series, My Brilliant Friend, based on the first of four Neapolitan novels — all international bestsellers — by Italian literary sensation Elena Ferrante tells the story of two intellectually gifted girls, Elena (Lenú) and Lila, growing up in a gritty piazza in post-World War II Naples. In their rough neighborhood, basic resources are scarce, fists solve conflicts, men violently dominate women, and small children labor to help keep their families afloat.

Lenú and Lila, with their insatiable appetites for knowledge and ability to imagine a better future, shine the brightest in their drab environs. While others in their town, beaten down and impoverished, can’t see beyond the borders of their walled-in reality, Lenú (cautious, reserved, steady, intelligent) and Lila (ferocious, wild, severe, brilliant) dare to think bigger. As young girls, they ditch their curfews and venture to the sea — a symbol of change, adventure, mystery, and power — and a sight Lila has never seen, despite living in such close proximity. While Lila instigates their exploit, she chickens out midway amid Lenú’s protests to continue, foreshadowing the larger life Lenú will go on to live.

The story of Lila and Lenú’s fiery friendship — a tempestuous romance of sorts  — offers fundamental lessons on how to endure despite the grossest forms of social injustice and daily struggle.

Cultivate your mind at all costs

Lila, an autodidact who taught herself Latin and Greek and can crunch complex mathematical equations in her head, and Lenú, who’s natively intelligent, but sweats for good grades, share a common love of knowledge. Despite all the obstacles between the girls and their educations — Lila’s father throws her from a window when she demands to take an entrance exam for middle school, and Lenú’s mother berates her mercilessly for insisting on advancing her studies rather than helping the family — their minds serve as the only escape from their prison of poverty. The two instinctively understand, even as small children, that the mind is the only entity we have control over, and the only truth path to liberation.

When Lila accepts that she can’t pursue a formalized education, she surreptitiously takes out library cards in every single one of her adult family members’ names so she can satiate her hunger for knowledge, winning three awards for each of them for reading the most books. Lenú, who also scores an accolade for checking out several volumes, and Lila read Little Women compulsively. The nineteenth century English novel feeds their hope of reaping financial reward from living a life of the mind, as Jo, one of the book’s main characters, eventually does. Several studies show the positive impact storytelling has on our capacity for empathy and ability to weather grief. And as the great literary icon Joan Didion, author of classics like Slouching Toward Bethlehem and The Year of Magical Thinking, once said, “We tell ourselves stories in order to live.”

Maintain your purpose

Part of the reason Lila and Lenú can survive the brutality of their everyday existence is because they both foster a larger sense of purpose, which a recent study in the Journal of Health Psychology found is positively linked to healthier behaviors, and shows a 20 percent decrease in the risk of death and cardiovascular disease. Whether they strive to learn, write, or, as Lila does alongside her brother Rino, design a shoe worthy of the wealthy, they move steadily toward fulfilling a larger vision for their lives.

Compete your way to growth

Lila and Lenú nourish each other’s growth — they feed off each other’s creativity and excite one another’s imaginations. While Lila engages in nasty attempts to thwart Lenú’s intellectual advancement — like designing a plot to get her in trouble with her mother so her mom reneges on allowing her to study — Lila is unquestionably the brighter of the two stars. “I realized she was ahead of me in everything,” Lenú says when she discovers that Lila has already read the ancient Greek text she’s laboring to understand. Without Lila’s intellectual companionship, Lenú’s grades plummet and her fever to learn decreases. But when she realizes that Lila has continued to study despite being forced out of school, Lenú’s fire to learn reignites. “From that moment on, I decided I would buckle down and study, promising myself I would never be less than her,” she says. Severals studies show that competition — especially of the academic variety — can actually improve performance. So a small amount of healthy competitive heat can actually inspire you to do better at work or in school, like Lila and Lenú.

Protect your friendships by taking breaks and forgiving one another

A study last year showed that close childhood friendships positively correlate with healthy social development and adult mental wellness, but sometimes we need a break from those we love. Lila and Lenú’s bond blazes with a life-affirming — and life-draining — intensity. But they seek space when they need it, even if they do so with youthful insensitivity. When Lila’s parents try to stop her from studying, her jealousy toward Lenú soars so high that she dodges Lenú’s friendship for a long stretch. When Lenú sails to the Island of Ischia for a few months, she writes Lila dozens of letters, which Lila fails to respond to because, she says, she doesn’t want to darken Lila’s happy days with the news of her father’s attempt to bully and beat her into marrying a smug and cruel young man. No matter how much they hurt one another — and their drama will reach a crescendo in forthcoming seasons — they continue to forgive one another, which studies indicate we’re hardwired to do even when someone falls from a mighty perch.

Despite being born into an environment that breeds unhealthy behaviors, we can derive important life lesson from watching these precocious best friends traverse difficult challenges. (HBO, Sundays and Mondays, 9 p.m.)

Follow us here and subscribe here for all the latest news on how you can keep Thriving.Stay up to date or catch-up on all our podcasts with Arianna Huffington here.