import sys
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni      = lambda: int(ns())
nin     = lambda y: [ni() for _ in range(y)]
na      = lambda: list(map(int, stdin.readline().split()))
nan     = lambda y: [na() for _ in range(y)]
nf      = lambda: float(ns())
nfn     = lambda y: [nf() for _ in range(y)]
nfa     = lambda: list(map(float, stdin.readline().split()))
nfan    = lambda y: [nfa() for _ in range(y)]
ns      = lambda: stdin.readline().rstrip()
nsn     = lambda y: [ns() for _ in range(y)]
ncl     = lambda y: [list(ns()) for _ in range(y)]
nas     = lambda: stdin.readline().split()

h, w = na()
s = nsn(h)

l = [[0] * w for _ in range(h)]
r = [[0] * w for _ in range(h)]
u = [[0] * w for _ in range(h)]
d = [[0] * w for _ in range(h)]

for i in range(h):
    for j in range(w):
        if s[i][j] == '#':
            l[i][j] = 0
            u[i][j] = 0
        else:
            if j == 0:
                l[i][j] = 1
            else:
                l[i][j] = l[i][j - 1] + 1
            
            if i == 0:
                u[i][j] = 1
            else:
                u[i][j] = u[i - 1][j] + 1

for i in range(h - 1, -1, -1):
    for j in range(w - 1, -1, -1):
        if s[i][j] == '#':
            r[i][j] = 0
            d[i][j] = 0
        else:
            if j == w - 1:
                r[i][j] = 1
            else:
                r[i][j] = r[i][j + 1] + 1
            
            if i == h - 1:
                d[i][j] = 1
            else:
                d[i][j] = d[i + 1][j] + 1

ans = 0
for i in range(h):
    for j in range(w):
        ans = max(ans, l[i][j] + r[i][j] + u[i][j] + d[i][j] - 3)

print(ans) import sys sys stdin = sys.stdin stdin sys.stdin sys stdin inf = 1 << 60 inf 1 << 60 1 60 mod = 1000000007 mod 1000000007 ni      = lambda: int(ns()) ni lambda: int(ns()) int(ns()) int ns() ns ni() for _ in range(y) for _ in range(y) _ range(y) range y for _ in range(y) ni() ni nin     = lambda y: [ni() for _ in range(y)] nin lambda y: [ni() for _ in range(y)] [ni() for _ in range(y)] y na      = lambda: list(map(int, stdin.readline().split())) na lambda: list(map(int, stdin.readline().split())) list(map(int, stdin.readline().split())) list map(int, stdin.readline().split()) map int stdin.readline().split() stdin.readline().split stdin.readline() stdin.readline stdin readline split na() for _ in range(y) for _ in range(y) _ range(y) range y for _ in range(y) na() na nan     = lambda y: [na() for _ in range(y)] nan lambda y: [na() for _ in range(y)] [na() for _ in range(y)] y nf      = lambda: float(ns()) nf lambda: float(ns()) float(ns()) float ns() ns nf() for _ in range(y) for _ in range(y) _ range(y) range y for _ in range(y) nf() nf nfn     = lambda y: [nf() for _ in range(y)] nfn lambda y: [nf() for _ in range(y)] [nf() for _ in range(y)] y nfa     = lambda: list(map(float, stdin.readline().split())) nfa lambda: list(map(float, stdin.readline().split())) list(map(float, stdin.readline().split())) list map(float, stdin.readline().split()) map float stdin.readline().split() stdin.readline().split stdin.readline() stdin.readline stdin readline split nfa() for _ in range(y) for _ in range(y) _ range(y) range y for _ in range(y) nfa() nfa nfan    = lambda y: [nfa() for _ in range(y)] nfan lambda y: [nfa() for _ in range(y)] [nfa() for _ in range(y)] y ns      = lambda: stdin.readline().rstrip() ns lambda: stdin.readline().rstrip() stdin.readline().rstrip() stdin.readline().rstrip stdin.readline() stdin.readline stdin readline rstrip ns() for _ in range(y) for _ in range(y) _ range(y) range y for _ in range(y) ns() ns nsn     = lambda y: [ns() for _ in range(y)] nsn lambda y: [ns() for _ in range(y)] [ns() for _ in range(y)] y list(ns()) for _ in range(y) for _ in range(y) _ range(y) range y for _ in range(y) list(ns()) list ns() ns ncl     = lambda y: [list(ns()) for _ in range(y)] ncl lambda y: [list(ns()) for _ in range(y)] [list(ns()) for _ in range(y)] y nas     = lambda: stdin.readline().split() nas lambda: stdin.readline().split() stdin.readline().split() stdin.readline().split stdin.readline() stdin.readline stdin readline split h, w = na() h na() na w s = nsn(h) s nsn(h) nsn h [0] * w for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) [0] * w [0] 0 w l = [[0] * w for _ in range(h)] l [[0] * w for _ in range(h)] [0] * w for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) [0] * w [0] 0 w r = [[0] * w for _ in range(h)] r [[0] * w for _ in range(h)] [0] * w for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) [0] * w [0] 0 w u = [[0] * w for _ in range(h)] u [[0] * w for _ in range(h)] [0] * w for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) [0] * w [0] 0 w d = [[0] * w for _ in range(h)] d [[0] * w for _ in range(h)] for i in range(h):
    for j in range(w):
        if s[i][j] == '#':
            l[i][j] = 0
            u[i][j] = 0
        else:
            if j == 0:
                l[i][j] = 1
            else:
                l[i][j] = l[i][j - 1] + 1
            
            if i == 0:
                u[i][j] = 1
            else:
                u[i][j] = u[i - 1][j] + 1 i range(h) range h for j in range(w):
        if s[i][j] == '#':
            l[i][j] = 0
            u[i][j] = 0
        else:
            if j == 0:
                l[i][j] = 1
            else:
                l[i][j] = l[i][j - 1] + 1
            
            if i == 0:
                u[i][j] = 1
            else:
                u[i][j] = u[i - 1][j] + 1 j range(w) range w if s[i][j] == '#':
            l[i][j] = 0
            u[i][j] = 0
        else:
            if j == 0:
                l[i][j] = 1
            else:
                l[i][j] = l[i][j - 1] + 1
            
            if i == 0:
                u[i][j] = 1
            else:
                u[i][j] = u[i - 1][j] + 1 s[i][j] == '#' s[i][j] [i] s i j '#' l[i][j] = 0 l[i][j] [i] l i j 0 u[i][j] = 0 u[i][j] [i] u i j 0 if j == 0:
                l[i][j] = 1
            else:
                l[i][j] = l[i][j - 1] + 1
            
             j == 0 j 0 l[i][j] = 1 l[i][j] [i] l i j 1 l[i][j] = l[i][j - 1] + 1 l[i][j] [i] l i j l[i][j - 1] + 1 l[i][j - 1] [i] l i j - 1 j 1 1 if i == 0:
                u[i][j] = 1
            else:
                u[i][j] = u[i - 1][j] + 1 i == 0 i 0 u[i][j] = 1 u[i][j] [i] u i j 1 u[i][j] = u[i - 1][j] + 1 u[i][j] [i] u i j u[i - 1][j] + 1 u[i - 1][j] [i - 1] u i - 1 i 1 j 1 for i in range(h - 1, -1, -1):
    for j in range(w - 1, -1, -1):
        if s[i][j] == '#':
            r[i][j] = 0
            d[i][j] = 0
        else:
            if j == w - 1:
                r[i][j] = 1
            else:
                r[i][j] = r[i][j + 1] + 1
            
            if i == h - 1:
                d[i][j] = 1
            else:
                d[i][j] = d[i + 1][j] + 1 i range(h - 1, -1, -1) range h - 1 h 1 -1 -1 for j in range(w - 1, -1, -1):
        if s[i][j] == '#':
            r[i][j] = 0
            d[i][j] = 0
        else:
            if j == w - 1:
                r[i][j] = 1
            else:
                r[i][j] = r[i][j + 1] + 1
            
            if i == h - 1:
                d[i][j] = 1
            else:
                d[i][j] = d[i + 1][j] + 1 j range(w - 1, -1, -1) range w - 1 w 1 -1 -1 if s[i][j] == '#':
            r[i][j] = 0
            d[i][j] = 0
        else:
            if j == w - 1:
                r[i][j] = 1
            else:
                r[i][j] = r[i][j + 1] + 1
            
            if i == h - 1:
                d[i][j] = 1
            else:
                d[i][j] = d[i + 1][j] + 1 s[i][j] == '#' s[i][j] [i] s i j '#' r[i][j] = 0 r[i][j] [i] r i j 0 d[i][j] = 0 d[i][j] [i] d i j 0 if j == w - 1:
                r[i][j] = 1
            else:
                r[i][j] = r[i][j + 1] + 1
            
             j == w - 1 j w - 1 w 1 r[i][j] = 1 r[i][j] [i] r i j 1 r[i][j] = r[i][j + 1] + 1 r[i][j] [i] r i j r[i][j + 1] + 1 r[i][j + 1] [i] r i j + 1 j 1 1 if i == h - 1:
                d[i][j] = 1
            else:
                d[i][j] = d[i + 1][j] + 1 i == h - 1 i h - 1 h 1 d[i][j] = 1 d[i][j] [i] d i j 1 d[i][j] = d[i + 1][j] + 1 d[i][j] [i] d i j d[i + 1][j] + 1 d[i + 1][j] [i + 1] d i + 1 i 1 j 1 ans = 0 ans 0 for i in range(h):
    for j in range(w):
        ans = max(ans, l[i][j] + r[i][j] + u[i][j] + d[i][j] - 3) i range(h) range h for j in range(w):
        ans = max(ans, l[i][j] + r[i][j] + u[i][j] + d[i][j] - 3) j range(w) range w ans = max(ans, l[i][j] + r[i][j] + u[i][j] + d[i][j] - 3) ans max(ans, l[i][j] + r[i][j] + u[i][j] + d[i][j] - 3) max ans l[i][j] + r[i][j] + u[i][j] + d[i][j] - 3 l[i][j] + r[i][j] + u[i][j] + d[i][j] l[i][j] + r[i][j] + u[i][j] l[i][j] + r[i][j] l[i][j] [i] l i j r[i][j] [i] r i j u[i][j] [i] u i j d[i][j] [i] d i j 3 print(ans) print ans ni      = lambda: int(ns()) lambda: int(ns()) ni s = nsn(h) nsn(h) s ncl     = lambda y: [list(ns()) for _ in range(y)] lambda y: [list(ns()) for _ in range(y)] ncl d = [[0] * w for _ in range(h)] [[0] * w for _ in range(h)] d na      = lambda: list(map(int, stdin.readline().split())) lambda: list(map(int, stdin.readline().split())) na nfan    = lambda y: [nfa() for _ in range(y)] lambda y: [nfa() for _ in range(y)] nfan nsn     = lambda y: [ns() for _ in range(y)] lambda y: [ns() for _ in range(y)] nsn h, w = na() na() h nan     = lambda y: [na() for _ in range(y)] lambda y: [na() for _ in range(y)] nan ns      = lambda: stdin.readline().rstrip() lambda: stdin.readline().rstrip() ns u = [[0] * w for _ in range(h)] [[0] * w for _ in range(h)] u inf = 1 << 60 1 << 60 inf mod = 1000000007 1000000007 mod nfn     = lambda y: [nf() for _ in range(y)] lambda y: [nf() for _ in range(y)] nfn nfa     = lambda: list(map(float, stdin.readline().split())) lambda: list(map(float, stdin.readline().split())) nfa ans = max(ans, l[i][j] + r[i][j] + u[i][j] + d[i][j] - 3) max(ans, l[i][j] + r[i][j] + u[i][j] + d[i][j] - 3) ans nf      = lambda: float(ns()) lambda: float(ns()) nf w = na() na() w l = [[0] * w for _ in range(h)] [[0] * w for _ in range(h)] l stdin = sys.stdin sys.stdin stdin r = [[0] * w for _ in range(h)] [[0] * w for _ in range(h)] r nas     = lambda: stdin.readline().split() lambda: stdin.readline().split() nas nin     = lambda y: [ni() for _ in range(y)] lambda y: [ni() for _ in range(y)] nin ans = 0 0 ans
import sys
stdin = sys.stdin
inf = 1 << 60
mod = 1000000007
 
ni      = lambda: int(ns())
nin     = lambda y: [ni() for _ in range(y)]
na      = lambda: list(map(int, stdin.readline().split()))
nan     = lambda y: [na() for _ in range(y)]
nf      = lambda: float(ns())
nfn     = lambda y: [nf() for _ in range(y)]
nfa     = lambda: list(map(float, stdin.readline().split()))
nfan    = lambda y: [nfa() for _ in range(y)]
ns      = lambda: stdin.readline().rstrip()
nsn     = lambda y: [ns() for _ in range(y)]
ncl     = lambda y: [list(ns()) for _ in range(y)]
nas     = lambda: stdin.readline().split()

h, w = na()
s = nsn(h)

l = [[0] * w for _ in range(h)]
r = [[0] * w for _ in range(h)]
u = [[0] * w for _ in range(h)]
d = [[0] * w for _ in range(h)]

for i in range(h):
    for j in range(w):
        if s[i][j] == '#':
            l[i][j] = 0
            u[i][j] = 0
        else:
            if j == 0:
                l[i][j] = 1
            else:
                l[i][j] = l[i][j - 1] + 1
            
            if i == 0:
                u[i][j] = 1
            else:
                u[i][j] = u[i - 1][j] + 1

for i in range(h - 1, -1, -1):
    for j in range(w - 1, -1, -1):
        if s[i][j] == '#':
            r[i][j] = 0
            d[i][j] = 0
        else:
            if j == w - 1:
                r[i][j] = 1
            else:
                r[i][j] = r[i][j + 1] + 1
            
            if i == h - 1:
                d[i][j] = 1
            else:
                d[i][j] = d[i + 1][j] + 1

ans = 0
for i in range(h):
    for j in range(w):
        ans = max(ans, l[i][j] + r[i][j] + u[i][j] + d[i][j] - 3)

print(ans)