Jim Halpert spent more of his time on The Office pranking Dwight Schrute than selling paper, but the price of one particular prank set him back a significant amount of money. Jim (John Krasinski) is notable for hating his job, only starting coming around when he realizes he needs the money to support his relationship with Pam (Jenna Fischer), so he spends most of his time over the series’ 9 seasons bothering his much-too-serious coworker Dwight (Rainn Wilson). Possibly because Dwight is most gullible in The Office - and the only employee to continually question Jim and call out his lack of motivation - Dwight is the primary recipient of Jim’s boredom-induced practical jokes.

Whether it be the cold open or an aspect of the overall storyline, nearly every single episode of The Office features Jim pranking Dwight. The first episode includes the simple prank of Jim putting Dwight’s stapler in Jell-o, whereas the series’ final “prank” culminates in Jim surprising Dwight with the heartwarming return of Michael Scott as the Best Man for Dwight’s wedding. Though the men constantly bicker throughout the show, Jim and Dwight’s relationship grows into a quasi-brotherhood frenemy situation with help from Dwight’s friend and Jim’s wife Pam.

Related: The Office Deleted Scene Reveals Michael Scott’s Job After Dunder Mifflin

While the first few seasons see Jim as the prankster and Dwight the target, as the series progresses it becomes much more mutual to the point where not only is Dunder Mifflin wasting money by paying them, but they eat up their own wallets as well. Certain pranks cost nothing but time away from doing work, while others - like Dwight stealing Jim’s credit card information to send Pam flowers - cost hundreds of dollars. It’s estimated that Jim spent nearly $6000 on pranking Dwight over the course of a decade, and his most expensive prank cost over half the budget. After tallying the financial costs of Jim’s pranks, it appears the one that set him back the most was when he and Pam learned morse code to talk about Dwight in front of him.

Dwight Schrute wearing headphones, looking sly

The Office season 6 episode 24, “The Cover-Up,” features a cold open where Jim and Pam rhythmically and methodically click their pen and mouse while sitting at their desks. Dwight quickly catches on to their strange behavior and accuses them of using morse code to communicate with each other and talk about him. Pam and Jim deny the accusation, claiming it would be ridiculous for them to spend money to learn morse code while they have a newborn baby at home. The scene immediately cuts to a talking head where Jim admits that’s “exactly what they did.”

Jim and Pam admit they hired a nanny to watch CeCe while they took a class on morse code, strictly to get revenge on Dwight for making an offensive comment to Pam to “lose the baby weight”. Though the retaliation aspect of the scheme seems to make it more Pam’s prank on Dwight than Jim’s, both of them were involved and flipped the bill. The cost of hiring a nanny for the course of taking a class on morse code while also paying for two people to take the class itself puts the price of the prank at over $3000. Most of Jim’s pranks averaged at about $70, so a $3000 prank to defend Pam’s honor is the most he spent to frustrate Dwight on The Office.

Next: The Office: Creed Was A Member Of The Manson Family Theory Explained