I’m not a math major, but when I see the equation of Paul Rudd + David Wain (director of “Role Models” and “Wet Hot American Summer”) + a commune of hippies, I expect the solution to be a laugh-my-ass-off comedy. Good thing I can still do basic problem solving.

“Wanderlust” stars comedy vet Paul Rudd and the no-longer-quite-a-box-office draw Jennifer Aniston as a couple of Manhattanites who suddenly find themselves without a place to live after Rudd’s character George loses his job unexpectedly. The couple is then forced to move in with George’s brother in Atlanta, but along the way there they stop at a bed and breakfast and that’s where the movie really kicks off.

I’m so thankful for the modern R-rated comedy. Whereas it used to be a dumping ground for puerile stoner-comedies, filmmakers like Judd Apatow, Evan Goldberg and even the likes of Rudd and Seth Rogen have proven that you can have a hilarious film with a rich story at the center.

Even without the presence of the usual suspects like Jane Lynch, Ken Jeong or Bill Hader, the supporting characters of this film steal most of the gags. That’s not to say that there aren’t some familiar faces in the cast. Even if you don’t know the names, you know who Michael Ian Black and Joe Lo Truglio are.

The real show-stealer though is Justin Theroux as Seth, the leader of the hippies. While the script is definitely responsible for his best lines, he puts so much into his performance that it’s hard to imagine anyone else in the role.

Earlier I touched on the fact that this was an R-rated comedy. It definitely deserves that, and it should be known that if you found yourself uncomfortable watching Jason Segel’s genitalia flopping around during “Forgetting Sarah Marshall,” then you might want to think about skipping this one, though you’ll definitely be missing out.

Based on advertising leading up to the film’s release, there was little doubt that this was anything more than an R-rated comedy not packing the title “Hangover.” So it was unceremoniously dumped in theaters on a weekend when every member of the armed forces was going to be spending his hard-earned cash on a less-than-coherent action film with real Navy SEALs in it.

Early box-office receipts have “Wanderlust” coming in at No. 8 with only a little over $6.5 million. That’s two full spots below “Ghost Rider: Spirit of Vengeance,” which is in its second week. What the hell is wrong with people?

Sometimes movies just don’t find their target audience till they hit home video, and I think it’s safe to assume at this point that “Wanderlust” will see a second life in DVD and Blu-Ray sales.