import Data.List
import Control.Monad

main = do
    [h,w] <- map read . words <$> getLine

    hori <- replicateM h getLine
    let vert = transpose hori

    let sumSc = zipWith (zipWith (+)) (map score hori) (transpose $ map score vert)

    print $ pred $ maximum $ map maximum sumSc

score xs = map (max 0.pred) $ zipWith (+) (tail $ scanl f 0 xs) (scanr (flip f) 0 xs)

f _ '#' = 0
f n '.' = n+1