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

main :: IO ()
main = do
    [h,w] <- map read . words <$> getLine :: IO [Int]
    a <- map BS.unpack . BS.lines
      <$> BS.getContents :: IO [String]
    let f x c = if c == '.' then x+1 else 0
        g = concatMap (\xs -> let x = last xs in replicate (length xs) x)
          . groupBy (\a b -> a /= 0 && b /= 0)
        aw = listArray ((1,1),(h,w))
           . concatMap (g . tail . scanl f 0) $ a :: Array (Int,Int) Int
        ah = listArray ((1,1),(h,w))
           . concat . transpose . map (g . tail . scanl f 0) $ transpose a :: Array (Int,Int) Int 
    print . pred . maximum . map (\i -> (aw!i) + (ah!i)) $ range ((1,1),(h,w))