THOUSAND OAKS, Calif. — The Los Angeles Rams have won two of their first three games for the second straight year, but are using an entirely different formula this season.

The offense is leading the way, making up for surprising breakdowns on defense and special teams in the Rams’ 41-39 win at San Francisco on Thursday night. It was the other way around last season, with the defense and special teams controlling things until the offense chipped in with a timely play or two.

First-year head coach Sean McVay wouldn’t say if the offense was performing better than he expected, but totaling 418 yards and averaging 7.0 yards per play against the 49ers would have seemed improbable to anyone who watched the Rams lose both games between the teams last season.

“I just kind of take it one day at a time, one game at a time, and I thought yesterday was a good offensive performance,” McVay said Friday. “Anytime that you are able to go 8 for 12 on third down, 5 for 7 in the red zone, those key situations, that’s going to give yourself a chance to score some points and do some good things.”

Jared Goff was 22 of 28 for 292 yards and three touchdowns without a turnover. Todd Gurley rushed for 113 yards, and Robert Woods and Sammy Watkins each topped 100 yards receiving.

Goff found Watkins on two touchdown passes, his first scores since being acquired from Buffalo in an offseason trade, but it was a 47-yard over-the-shoulder catch that showed both his potential and that of the Rams’ new offense. McVay compared Watkins’ ability to track the ball on that play to that of DeSean Jackson, who thrived as the deep threat in Washington when McVay was offensive coordinator.

“I heard the announcers say a Willie Mays-type catch where you’re tracking it over your inside and then over your outside shoulder kind of like a deep center fielder, but those are the types of plays that make Sammy a special player,” McVay said. “To be able to make that big play down the field I thought was a huge spark for our offense at the time.”

Watkins’ sensational catch came two plays after center John Sullivan suffered a groin injury that knocked him out of the game. McVay was impressed that the offense was able to maintain its momentum with backup Austin Blythe replacing the free-agent signing. Blythe even received a game ball in the locker room after the win.

The focus ahead of next Sunday’s game at the Dallas Cowboys will be getting the defense to find some consistency after struggling in each of the last two games. However, McVay was pleased with the unit’s ability to come through with timely plays.

McVay pointed to cornerback Troy Hill breaking up the two-point conversion that would have tied the game, allowing defensive tackle Michael Brockers to intercept the pass.

“Then they end up recovering the onside kick and what our defense does is find a way to get them off,” McVay said. “Aaron finishes off the game with a sack to close it out. And, really, you look at the second down play we were in a man coverage and Mark Barron makes an unbelievable tackle on a screen. They were their best when they had to be.”