The music and lyrics for the theme song, "The Ballad of Gilligan’s Isle," were written by Sherwood Schwartz and George Wyle. One version was used for the first season and another for the second and third. In the original song, the Professor and Mary Ann were referred to as "and the rest." Actors Russell Johnson and Dawn Wells were originally considered "second-billed co-stars," but with the growing popularity of their characters, their names were inserted into the lyrics. Wells has said that star Bob Denver went to the studio executives to get Johnson and herself added to the opening credits. The studio originally refused, stating it would be too costly to re-shoot and re-score the opening. Denver pointed out that his contract stated he could have his name anywhere he wanted in the credits, so they could move it to the end credits along with Johnson and Wells. The studio capitulated. Wells said that Denver never mentioned this to anyone in the cast, and she did not find out about it until years after the show ended.