local H, W = io.read("*n", "*n", "*l")

local function mk2d()
    local t = {}
    for i=1,H do
        t[i] = {}
    end
    return t
end

local grid = mk2d()
for i=1,H do
    local s = io.read("*l")
    local line = grid[i]
    for j=1,W do
        line[j] = string.sub(s, j, j) == '#' and 1 or 0
    end
end

local U = mk2d()
local D = mk2d()
local L = mk2d()
local R = mk2d()

-- L
for i=1,H do
    local line = grid[i]
    local target = L[i]
    local cnt = 0
    for j=1, W do
        local a = line[j]
        if a == 0 then
            cnt = cnt + 1
        else
            cnt = 0
        end
        target[j] = cnt
    end
end
-- R
for i=1,H do
    local line = grid[i]
    local target = R[i]
    local cnt = 0
    for j=W, 1, -1 do
        local a = line[j]
        if a == 0 then
            cnt = cnt + 1
        else
            cnt = 0
        end
        target[j] = cnt
    end
end
-- U
for j=1,W do
    local cnt = 0
    for i=1,H do
        local a = grid[i][j]
        if a == 0 then
            cnt = cnt + 1
        else
            cnt = 0
        end
        U[i][j] = cnt
    end
end
-- D
for j=1,W do
    local cnt = 0
    for i=H,1,-1 do
        local a = grid[i][j]
        if a == 0 then
            cnt = cnt + 1
        else
            cnt = 0
        end
        D[i][j] = cnt
    end
end

local function count(i, j)
    if grid[i][j] == 1 then
        return -1
    else
        local a = L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3
        return a
    end
end

local ans = 0
for i=1,H do
    for j=1,W do
        ans = math.max(ans, count(i, j))
    end
end
print(ans)
