By the end of the century, some of San Francisco’s million-dollar apartments and multimillion dollar houses will be underwater. A recent report calculated that property worth a total of $77 billion is at risk from rising seas in the city.

“We developed a digital map showing how much property would be in the bay, as opposed to what’s on land today,” says Paul VanderMarck, chief strategy officer at Risk Management Solutions (RMS), the company that mapped out the risk for the city.

In the past, RMS focused on modeling different types of risk, such as earthquakes, for the insurance industry. Now their business is shifting to a new problem: helping coastal cities figure out how to deal with changing coastlines.

In San Francisco, the city is creating a new action plan that will be based on a worst-case scenario of 5.5 feet of permanent sea level rise, plus another 40 inches of temporary flooding from high tides and heavy rain.

The city considered various scenarios, but decided to base its plans on the most possible flooding that’s likely to occur. “In general, [scientific] models have been underestimating what’s happening,” says VanderMarck. “If you set plans for how you’re going to build buildings and sea walls and protect infrastructure–and you invest billions over decades, and then it turns out that your estimates of sea level rise were too low–then the implications for cost are very significant.” Not to mention the people living there.

Around the city, more than 200,000 commercial and residential buildings–along with major infrastructure like the airport–are at risk from either temporary flooding or permanent loss due to sea level rise if the city does nothing to prepare. Even more dangerously, the risk extends well inland, and isn’t limited to property directly on the coast.

Armed with the new maps, San Francisco is currently creating a strategy to try to save as much property as possible. “It’s almost inevitable that, in the end, the plan will be a combination of multiple approaches,” says VanderMarck. “One approach in some areas will be to surrender to the fact that seas are rising–it’s impractical, either economically or for other reasons, to try to defend against that in certain areas.” In other places, the city may build higher walls or other defenses.