local mce, mfl, msq, mmi, mma = math.ceil, math.floor, math.sqrt, math.min, math.max
local mab = math.abs
local h, w = io.read("*n", "*n", "*l")
local str = ""
-- local kabe = {}
local kabe_per_row = {}
for i = 1, h do kabe_per_row[i] = {} end
local kabe_per_col = {}
for i = 1, w do kabe_per_col[i] = {} end


for i = 1, h do
  str = io.read()
  for j = 1, w do
    local iskabe = str:sub(j, j) == "#"
    if iskabe then
      table.insert(kabe_per_row[i], j)
      table.insert(kabe_per_col[j], i)
    end
    -- kabe[(i - 1) * w + j] = (str:sub(j, j) == "#")
  end
end
local score = {}
for i = 1, h * w do score[i] = -1 end
for i = 1, h do
  local kabelist = kabe_per_row[i]
  local kabenum = #kabelist
  if kabenum == 0 then
    for j = 1, w do
      local idx = (i - 1) * w + j
      score[idx] = score[idx] + w
    end
  else
    local stt = 1
    local ed = kabelist[1] - 1
    for j = stt, ed do
      local idx = (i - 1) * w + j
      score[idx] = score[idx] + ed - stt + 1
    end
    for ikabe = 1, kabenum - 1 do
      stt, ed = kabelist[ikabe] + 1, kabelist[ikabe + 1] - 1
      for j = stt, ed do
        local idx = (i - 1) * w + j
        score[idx] = score[idx] + ed - stt + 1
      end
    end
    stt, ed = kabelist[kabenum] + 1, w
    for j = stt, ed do
      local idx = (i - 1) * w + j
      score[idx] = score[idx] + ed - stt + 1
    end
  end
end

for j = 1, w do
  local kabelist = kabe_per_col[j]
  local kabenum = #kabelist
  if kabenum == 0 then
    for i = 1, h do
      local idx = (i - 1) * w + j
      score[idx] = score[idx] + h
    end
  else
    local stt = 1
    local ed = kabelist[1] - 1
    for i = stt, ed do
      local idx = (i - 1) * w + j
      score[idx] = score[idx] + ed - stt + 1
    end
    for ikabe = 1, kabenum - 1 do
      stt, ed = kabelist[ikabe] + 1, kabelist[ikabe + 1] - 1
      for i = stt, ed do
        local idx = (i - 1) * w + j
        score[idx] = score[idx] + ed - stt + 1
      end
    end
    stt, ed = kabelist[kabenum] + 1, h
    for i = stt, ed do
      local idx = (i - 1) * w + j
      score[idx] = score[idx] + ed - stt + 1
    end
  end
end
local max = 0
for i = 1, h * w do
  max = mma(max, score[i])
end
print(max)
