Warning: This article contains adult language and spoilers for The Martian

There is a scene early in The Martian where stranded astronaut Mark Watney has to perform surgery on himself, pulling a chunk of metal from his own body. It's a tense, sober scene that's hard to watch, but does a great job of showing just how precarious Watney's situation is while establishing his will and competence.

After the surgery is performed successfully Watney leans back and says a single word: "Fuck." It's a wonderful moment, a breath of air for the audience and the character. The first crisis is over, and he survived. Now comes the hard point.

That's important

The use of that word is important, because later in the film Watney says it again: "Fuck Mars." The two uses of the word "fuck" are audible, but those aren't the only times the word is used in the film, although director Ridley Scott shoots around them. During one scene the camera is pulled away from Watney's point of view into the environment of Mars. We see him through a window, and he clearly says "fuck," although we don't hear it. In another scene it's part of a text exchange, and it's spelled out as 'f---'"

This is a sticking point because a film's rating has much to do with its ability to make money: You don't need parents to see a movie rated PG-13, which means more people can see it, and those films tend to make more money. Wider audiences equals more bodies in seats, meaning more revenue.

If you've ever wondered why action films are edited down to PG-13 for the theater while the R-rated cut that makes it onto home video seems more like the version the director intended, that is the answer.

And you can only say "fuck" once in a PG-13 rated film. Say it twice? You're slapped with an R-rating.

In fact, screenwriter Drew Goddard only intended one use of the word. He explains the situation in an interview with HitFix:

We only thought we'd have one, ’cause that's usually what the rule is. When I first wrote the script, the storm is in the middle the way it is in the book. I wanted to start with Mark waking up on Mars, and I wanted the first word of the movie to be ‘f---.’ It’s sort of the spirit of the first sentence of the book — "I’m pretty much f---ed." I love the comedy of it. In a weird way those four words represent the movie: "I’m pretty much f---ed." It's not "I’m f---ed." "I’m not giving up hope" is really what it's implying. And I like that. I wanted that first "f—" to convey that. You can't say "I’m pretty much f---ed" ’cause it’s sort of past tense, and movies are much more about present tense, if that makes sense. So I wanted to sort of visually get that, which is why we put such an intense sort of self-surgery scene right there. And then to balance it, have him just go "F---." It just felt right. And then there was another one later where Matt says "F--- you, Mars," and it was very much an ad-lib, and we just liked it so much that we fought to keep it. He brings up the "rule" and knows he had to write around it, but what is the rule exactly? I went digging online and found the actual ratings guide the MPAA uses for films. The wording is super-specific and kind of weird: "A motion picture’s single use of one of the harsher sexually-derived words, though only as an expletive, initially requires at least a PG-13 rating," the guidelines state. "More than one such expletive requires an R rating, as must even one of those words used in a sexual context." Keep in mind the rule says that it's an instant R if you only say it once in a sexual context. So if I say, "Yeah, those two fucked," my film is going to be rated R and there's nothing to be done. I'm using the word to describe a sex act. But if my film says, "After the car crashed those two are completely fucked," then I can still keep my PG-13 rating. It's non-sexual, but I can't say the word again. So The Martian was completely fucked due to its two uses of the word, right? Check out the rest of the rule: The Rating Board nevertheless may rate such a motion picture PG-13 if, based on a special vote by a two-third majority, the Raters feel that most American parents would believe that a PG-13 rating is appropriate because of the context or manner in which the words are used or because the use of those words in the motion picture is inconspicuous. This is where it gets interesting, because that leaves a lot of wiggle room. The first usage of the word occurs after the character realizes he's been left behind and goes through a painful self-administered surgical procedure. That's a pretty understandable time to use the word "fuck," as is the "Fuck Mars" that's used later in the film. The character is dealing with his stress in a realistic and healthy way, by venting verbally. It's not gratuitous — it's human and understandable. So the Rating Board used the rule in the manner it was intended, and The Martian got to keep its two fucks, while getting creative in the editing to allow the rest of them to remain in the film, via edited text and non-audible lip reading. Pretty fucking cool, huh?

Check out the debut episode of Polygon Backstory, a podcast about celebrating the games we play.This week's episode focuses on Astroneer, a game about astronauts trying to survive and thrive