import numpy as np

h, w = map(int, input().split())
s = [input() for _ in range(h)]

t = np.zeros((h, w), dtype=np.int32)
for i in range(h):
    for j in range(w):
        if s[i][j] == '.':
            t[i][j] = 1

l = np.zeros((h, w), dtype=np.int32)
r = np.zeros((h, w), dtype=np.int32)
u = np.zeros((h, w), dtype=np.int32)
d = np.zeros((h, w), dtype=np.int32)

for i in range(w):
    if i == 0:
        l[:, i] = t[:, i]
    else:
        l[:, i] = (l[:, i-1] + 1) * t[:, i]

for i in range(w-1, -1, -1):
    if i == w-1:
        r[:, i] = t[:, i]
    else:
        r[:, i] = (r[:, i+1] + 1) * t[:, i]

for i in range(h):
    if i == 0:
        u[i] = t[i]
    else:
        u[i] = (u[i-1] + 1) * t[i]

for i in range(h-1, -1, -1):
    if i == h-1:
        d[i] = t[i]
    else:
        d[i] = (d[i+1] + 1) * t[i]

lrud = l+r+u+d-3
print(np.max(lrud)) import numpy as np numpy h, w = map(int, input().split()) h map(int, input().split()) map int input().split() ().split () input split w input() for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) input() input s = [input() for _ in range(h)] s [input() for _ in range(h)] t = np.zeros((h, w), dtype=np.int32) t np.zeros((h, w), dtype=np.int32) np.zeros np zeros (h, w) h w dtype=np.int32 dtype np.int32 np int32 for i in range(h):
    for j in range(w):
        if s[i][j] == '.':
            t[i][j] = 1 i range(h) range h for j in range(w):
        if s[i][j] == '.':
            t[i][j] = 1 j range(w) range w if s[i][j] == '.':
            t[i][j] = 1 s[i][j] == '.' s[i][j] [i] s i j '.' t[i][j] = 1 t[i][j] [i] t i j 1 l = np.zeros((h, w), dtype=np.int32) l np.zeros((h, w), dtype=np.int32) np.zeros np zeros (h, w) h w dtype=np.int32 dtype np.int32 np int32 r = np.zeros((h, w), dtype=np.int32) r np.zeros((h, w), dtype=np.int32) np.zeros np zeros (h, w) h w dtype=np.int32 dtype np.int32 np int32 u = np.zeros((h, w), dtype=np.int32) u np.zeros((h, w), dtype=np.int32) np.zeros np zeros (h, w) h w dtype=np.int32 dtype np.int32 np int32 d = np.zeros((h, w), dtype=np.int32) d np.zeros((h, w), dtype=np.int32) np.zeros np zeros (h, w) h w dtype=np.int32 dtype np.int32 np int32 for i in range(w):
    if i == 0:
        l[:, i] = t[:, i]
    else:
        l[:, i] = (l[:, i-1] + 1) * t[:, i] i range(w) range w if i == 0:
        l[:, i] = t[:, i]
    else:
        l[:, i] = (l[:, i-1] + 1) * t[:, i] i == 0 i 0 l[:, i] = t[:, i] l[:, i] l : t[:, i] t : l[:, i] = (l[:, i-1] + 1) * t[:, i] l[:, i] l : (l[:, i-1] + 1) * t[:, i] l[:, i-1] + 1 l[:, i-1] l : 1 t[:, i] t : for i in range(w-1, -1, -1):
    if i == w-1:
        r[:, i] = t[:, i]
    else:
        r[:, i] = (r[:, i+1] + 1) * t[:, i] i range(w-1, -1, -1) range w-1 w 1 -1 -1 if i == w-1:
        r[:, i] = t[:, i]
    else:
        r[:, i] = (r[:, i+1] + 1) * t[:, i] i == w-1 i w-1 w 1 r[:, i] = t[:, i] r[:, i] r : t[:, i] t : r[:, i] = (r[:, i+1] + 1) * t[:, i] r[:, i] r : (r[:, i+1] + 1) * t[:, i] r[:, i+1] + 1 r[:, i+1] r : 1 t[:, i] t : for i in range(h):
    if i == 0:
        u[i] = t[i]
    else:
        u[i] = (u[i-1] + 1) * t[i] i range(h) range h if i == 0:
        u[i] = t[i]
    else:
        u[i] = (u[i-1] + 1) * t[i] i == 0 i 0 u[i] = t[i] u[i] u i t[i] t i u[i] = (u[i-1] + 1) * t[i] u[i] u i (u[i-1] + 1) * t[i] u[i-1] + 1 u[i-1] u i-1 i 1 1 t[i] t i for i in range(h-1, -1, -1):
    if i == h-1:
        d[i] = t[i]
    else:
        d[i] = (d[i+1] + 1) * t[i] i range(h-1, -1, -1) range h-1 h 1 -1 -1 if i == h-1:
        d[i] = t[i]
    else:
        d[i] = (d[i+1] + 1) * t[i] i == h-1 i h-1 h 1 d[i] = t[i] d[i] d i t[i] t i d[i] = (d[i+1] + 1) * t[i] d[i] d i (d[i+1] + 1) * t[i] d[i+1] + 1 d[i+1] d i+1 i 1 1 t[i] t i lrud = l+r+u+d-3 lrud l+r+u+d-3 l+r+u+d l+r+u l+r l r u d 3 print(np.max(lrud)) print np.max(lrud) np.max np max lrud s = [input() for _ in range(h)] [input() for _ in range(h)] s u = np.zeros((h, w), dtype=np.int32) np.zeros((h, w), dtype=np.int32) u r = np.zeros((h, w), dtype=np.int32) np.zeros((h, w), dtype=np.int32) r t = np.zeros((h, w), dtype=np.int32) np.zeros((h, w), dtype=np.int32) t w = map(int, input().split()) map(int, input().split()) w lrud = l+r+u+d-3 l+r+u+d-3 lrud d = np.zeros((h, w), dtype=np.int32) np.zeros((h, w), dtype=np.int32) d l = np.zeros((h, w), dtype=np.int32) np.zeros((h, w), dtype=np.int32) l h, w = map(int, input().split()) map(int, input().split()) h
import numpy as np

h, w = map(int, input().split())
s = [input() for _ in range(h)]

t = np.zeros((h, w), dtype=np.int32)
for i in range(h):
    for j in range(w):
        if s[i][j] == '.':
            t[i][j] = 1

l = np.zeros((h, w), dtype=np.int32)
r = np.zeros((h, w), dtype=np.int32)
u = np.zeros((h, w), dtype=np.int32)
d = np.zeros((h, w), dtype=np.int32)

for i in range(w):
    if i == 0:
        l[:, i] = t[:, i]
    else:
        l[:, i] = (l[:, i-1] + 1) * t[:, i]

for i in range(w-1, -1, -1):
    if i == w-1:
        r[:, i] = t[:, i]
    else:
        r[:, i] = (r[:, i+1] + 1) * t[:, i]

for i in range(h):
    if i == 0:
        u[i] = t[i]
    else:
        u[i] = (u[i-1] + 1) * t[i]

for i in range(h-1, -1, -1):
    if i == h-1:
        d[i] = t[i]
    else:
        d[i] = (d[i+1] + 1) * t[i]

lrud = l+r+u+d-3
print(np.max(lrud))