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 larr = A.array ((1,1),(h,w)) [((i,j), f i j)| i <- [1..h], j <- [1..w]]
            where f i j | ss A.! (i,j) == '#' = 0
                        | j == 1 = 1
                        | otherwise = larr A.! (i,j-1) + 1
    let rarr = A.array ((1,1),(h,w)) [((i,j), f i j)| i <- [1..h], j <- [1..w]]
            where f i j | ss A.! (i,j) == '#' = 0
                        | j == w = 1
                        | otherwise = rarr A.! (i,j+1) + 1

    let uarr = A.array ((1,1),(h,w)) [((i,j), f i j)| i <- [1..h], j <- [1..w]]
            where f i j | ss A.! (i,j) == '#' = 0
                        | i == 1 = 1
                        | otherwise = uarr A.! (i-1,j) + 1

    let darr = A.array ((1,1),(h,w)) [((i,j), f i j)| i <- [1..h], j <- [1..w]]
            where f i j | ss A.! (i,j) == '#' = 0
                        | i == h = 1
                        | otherwise = darr A.! (i+1,j) + 1
    let ans = maximum [f i j| i <- [1..h], j <- [1..w]]
            where f i j = larr A.! (i,j) + rarr A.! (i,j) + uarr A.! (i,j) + darr A.! (i,j) - 3
    print ans