Bernie Sanders is looking for a Hollywood ending now.

The Vermont senator suffered a disappointing loss in New York to Hillary Clinton on Tuesday night, and that made the odds steeper for him to become the Democratic presidential nominee.

Still, Sanders is setting his sights on California and will open his first official campaign office in Los Angeles today as he aims for a June 7 primary win.

Sanders already trailed Clinton in pledged delegates before the New York totals were finalized but he has vowed to keep running until ballots are cast in the Golden State, which has 475 to divvy up and dish out proportionally.

Sanders has enough money to stay in the race. Through March, he’d raised $139.8 million, more than enough to compete in upcoming delegate-rich states such as Maryland, Pennsylvania and New Jersey.

He’s still short on the delegate math, however.

Sherry Bebitch Jeffe, a political analyst at USC, said Sanders believes he has no reason to stop.

“Do you think he will bother with the math?” she asked. “It appears to me that once a candidate has dug in and once he has seen he is viable as a candidate — and he is — I don’t see any reason why he would listen to the mathematicians.”

The decision for Sanders to open up a new campaign office in Southern California may be a strategic attempt to garner more support among minority voters, despite the latest Field Poll showing him performing stronger overall in the Bay Area.

In that poll, Sanders’ favorable ratings in the Bay Area were 70 percent. In Los Angeles County, his favorable rating was at 59 percent. Riverside, Orange and San Bernardino counties had Sanders rating favorably at about 47 percent.

Eric C. Bauman, chairman of the Los Angeles County Democratic Party, said Sanders could score well in California because, unlike New York, it’s an open primary where independents can vote.

“Even if Sanders can’t reach the magic number, I think his core supporters will come out and vote because they want him to have as many delegates as possible to impact the outcome and the direction of the party,” Bauman said.

Dan Schnur, director of the Jesse M. Unruh Institute of Politics, said a win by Sanders in California would allow him to bargain for deals at the party convention.

“Either Clinton cruises into the convention with a head of steam after a win in California that relegates Sanders to a minor role or he wins California and is in a position to make a lot of demands of her,” Schnur said. “She can’t get elected in the general election unless Sanders motivates his supporters behind her.”