import Control.Monad
import Data.Array

main = do
    [h,w] <- map read . words <$> getLine
    ss <- array ((1,1), (h,w)) . zip [(i,j)| i <- [1..h], j <- [1..w]] . filter (/= '\n') <$> getContents
    let ls :: Array (Int,Int) Int
        ls = array ((1,1), (h,w)) [((i,j),l i j)| i <- [1..h], j <- [1..w]]
             where l i j | ss ! (i,j) == '#' = 0
                         | i == 1 = 1
                         | otherwise = ls ! (i-1,j) + 1
        rs :: Array (Int,Int) Int
        rs = array ((1,1), (h,w)) [((i,j),r i j)| i <- [1..h], j <- [1..w]]
             where r i j | ss ! (i,j) == '#' = 0
                         | i == h = 1
                         | otherwise = rs ! (i+1,j) + 1
        us :: Array (Int,Int) Int
        us = array ((1,1), (h,w)) [((i,j),u i j)| i <- [1..h], j <- [1..w]]
             where u i j | ss ! (i,j) == '#' = 0
                         | j == 1 = 1
                         | otherwise = us ! (i,j-1) + 1
        ds :: Array (Int,Int) Int
        ds = array ((1,1), (h,w)) [((i,j),d i j)| i <- [1..h], j <- [1..w]]
             where d i j | ss ! (i,j) == '#' = 0
                         | j == w = 1
                         | otherwise = ds ! (i,j+1) + 1
    let ans = (subtract 3) $ maximum [ls ! (i,j) + rs ! (i,j) + us ! (i,j) + ds ! (i,j)|i <- [1..h], j <- [1..w]]
    print ans