import Control.Monad
import Data.Maybe
import qualified Data.ByteString.Char8 as BS
import Data.List
import qualified Data.Array as A

readInt = fst . fromJust . BS.readInt
readIntList = map readInt . BS.words
getInt = readInt <$> BS.getLine
getIntList = readIntList <$> BS.getLine

main = do
    [h,w] <- getIntList
    ss <- A.array ((1,1),(h,w)) . zip [(i,j)| i <- [1..h], j <- [1..w]] . filter (/= '\n') <$> getContents
    let arr = A.array ((1,1),(h,w)) [((i,j), (l i j, r i j, u i j, d i j))| i <- [1..h], j <- [1..w]]
            where l i j | ss A.! (i,j) == '#' = 0
                        | j == 1 = 1
                        | otherwise = let (x,_,_,_) = arr A.! (i,j-1) in (x + 1)
                  r i j | ss A.! (i,j) == '#' = 0
                        | j == w = 1
                        | otherwise = let (_,x,_,_) = arr A.! (i,j+1) in (x + 1)
                  u i j | ss A.! (i,j) == '#' = 0
                        | i == 1 = 1
                        | otherwise = let (_,_,x,_) = arr A.! (i-1,j) in (x + 1)
                  d i j | ss A.! (i,j) == '#' = 0
                        | i == h = 1
                        | otherwise = let (_,_,_,x) = arr A.! (i+1,j) in (x + 1)
    let ans = maximum . map (\(l,r,u,d) -> l+r+u+d-3) $ A.elems arr
    print ans