The remake from Hilary Winston becomes the network's sixth comedy addition for 2013-14.

CBS is going to school.

The first-place network has handed out a series order to Hilary Winston's adaptation of Bad Teacher, The Hollywood Reporter has learned.

Based on the 2011 Cameron Diaz feature, Fringe's Ari Graynor stars as a sexy, foul-mouthed divorcee who becomes a teacher in order to find her next husband. Community's Winston penned the pilot and executive produces alongside Lee Eisenberg and Gene Stupnitsky, who penned the screenplay for the film. Sam Hansen, Jimmy Miller and Sara Rodier also exec produce the Sony Pictures Television, CBS Television Studios and Mosaic single-camera comedy.

PHOTOS: CBS' 2013-14 Season: 'Hostages,' 'Intelligence,' 'Mom,' 'Crazy Ones'

Bad Teacher marks CBS' sixth comedy series order for the 2013-14 broadcast season (up from two in 2012-13). It comes at a time when CBS is bulking up on comedy offerings as the network looks to find a replacement for How I Met Your Mother, which will come to an end after its upcoming ninth season.

To that point, CBS is expanding its Thursday lineup to feature two hours of comedy, with Greg Garcia's The Millers and David E. Kelley's Robin Williams-Sarah Michelle Gellar vehicle airing back-to-back following The Big Bang Theory. Chuck Lorre's fourth sitcom, Anna Faris starrer Mom and Tony Shalhoub entry We Are Men will air on Mondays come fall.

For its part, Bad Teacher comes with built-in name recognition, with the feature co-starring Justin Timberlake grossing more than $216 million worldwide. CBS' adaptation also boasts a recognizable cast in co-stars Ryan Hansen (Veronica Mars), David Alan Grier (In Living Color), Sara Gilbert (The Talk, Roseanne) and Kristin Davis (Sex and the City).

STORY: TV Upfronts By the Numbers: Dramas Double, Family Comedies Surge

Producers Eisenberg and Stupnitsky, meanwhile, had three pilots in contention this season with two now moving forward after ABC added Trophy Wife to its schedule. (The duo's adaptation of Pulling was passed over at ABC.) They join a group of eight mega-producers who had two or more shows ordered to series this season, including J.J. Abrams, Howard Gordon, Julie Plec and Bill Lawrence.

CBS also has James Van Der Beek entry Friends With Better Lives on the bench for midseason.

For producer Sony Pictures Television, Bad Teacher marks its eighth sale this season and first to CBS. The studio now has new series set up at all of the Big Four broadcast networks.