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

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

main = do
    [h,w] <- getIntList
    grid <- replicateM h getLine
    let x = map lighten grid
        y = map lighten (transpose grid)
    print . pred . maximum $ [x !! i !! j + y !! j !! i | i<-[0..h-1],j<-[0..w-1]]

lighten xs = concat . map f $ group xs
    where f g | head g == '#' = map (const 0) g
              | otherwise = map (const (length g)) g