import qualified Data.ByteString.Char8 as BS
import Data.Maybe (fromJust)
import Data.List

countLine :: String -> [Int]
countLine ln = map (max 0 . pred) $ zipWith (+) l r
  where
    f :: Int -> Char -> Int
    f a c = if c == '.' then a + 1 else 0
    l = tail $ scanl f 0 ln
    r = init $ scanr (flip f) 0 ln

main :: IO ()
main = do
    [h,w] <- map read . words <$> getLine :: IO [Int]
    a <- map BS.unpack . BS.lines
      <$> BS.getContents :: IO [String]
    let a1 = map countLine a
        a2 = transpose . map countLine $ transpose a
        a3 = zipWith (zipWith (+)) a1 a2
    print . pred . maximum $ concat a3 
