h, w = map(int, input().split())
s = [list(input()) for _ in range(h)]
t = [[-1] * w for _ in range(h)]
cnt = [0] * 2005
ans = 0
for i in range(h):
    x = 1
    cnt[1] = 0
    for j in range(w):
        if s[i][j] == ".":
            t[i][j] = x
            cnt[x] += 1
        else:
            x += 1
            cnt[x] = 0
    for j in range(w):
        if not t[i][j] == -1:
            t[i][j] = cnt[t[i][j]]
for j in range(w):
    x = 1
    cnt[1] = 0
    for i in range(h):
        if s[i][j] == ".":
            s[i][j] = x
            cnt[x] += 1
        else:
            x += 1
            cnt[x] = 0
    for i in range(h):
        if not s[i][j] == "#":
            ans = max(ans, t[i][j] + cnt[s[i][j]] - 1)
print(ans) h, w = map(int, input().split()) h map(int, input().split()) map int input().split() ().split () input split w list(input()) for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) list(input()) list input() input s = [list(input()) for _ in range(h)] s [list(input()) for _ in range(h)] [-1] * w for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) [-1] * w [-1] -1 w t = [[-1] * w for _ in range(h)] t [[-1] * w for _ in range(h)] cnt = [0] * 2005 cnt [0] * 2005 [0] 0 2005 ans = 0 ans 0 for i in range(h):
    x = 1
    cnt[1] = 0
    for j in range(w):
        if s[i][j] == ".":
            t[i][j] = x
            cnt[x] += 1
        else:
            x += 1
            cnt[x] = 0
    for j in range(w):
        if not t[i][j] == -1:
            t[i][j] = cnt[t[i][j]] i range(h) range h x = 1 x 1 cnt[1] = 0 cnt[1] cnt 1 0 for j in range(w):
        if s[i][j] == ".":
            t[i][j] = x
            cnt[x] += 1
        else:
            x += 1
            cnt[x] = 0
     j range(w) range w if s[i][j] == ".":
            t[i][j] = x
            cnt[x] += 1
        else:
            x += 1
            cnt[x] = 0
     s[i][j] == "." s[i][j] [i] s i j "." t[i][j] = x t[i][j] [i] t i j x cnt[x] += 1 cnt[x] cnt x 1 x += 1 x 1 cnt[x] = 0 cnt[x] cnt x 0 for j in range(w):
        if not t[i][j] == -1:
            t[i][j] = cnt[t[i][j]] j range(w) range w if not t[i][j] == -1:
            t[i][j] = cnt[t[i][j]] not t[i][j] == -1 t[i][j] == -1 t[i][j] [i] t i j -1 t[i][j] = cnt[t[i][j]] t[i][j] [i] t i j cnt[t[i][j]] cnt t[i][j] [i] t i j for j in range(w):
    x = 1
    cnt[1] = 0
    for i in range(h):
        if s[i][j] == ".":
            s[i][j] = x
            cnt[x] += 1
        else:
            x += 1
            cnt[x] = 0
    for i in range(h):
        if not s[i][j] == "#":
            ans = max(ans, t[i][j] + cnt[s[i][j]] - 1) j range(w) range w x = 1 x 1 cnt[1] = 0 cnt[1] cnt 1 0 for i in range(h):
        if s[i][j] == ".":
            s[i][j] = x
            cnt[x] += 1
        else:
            x += 1
            cnt[x] = 0
     i range(h) range h if s[i][j] == ".":
            s[i][j] = x
            cnt[x] += 1
        else:
            x += 1
            cnt[x] = 0
     s[i][j] == "." s[i][j] [i] s i j "." s[i][j] = x s[i][j] [i] s i j x cnt[x] += 1 cnt[x] cnt x 1 x += 1 x 1 cnt[x] = 0 cnt[x] cnt x 0 for i in range(h):
        if not s[i][j] == "#":
            ans = max(ans, t[i][j] + cnt[s[i][j]] - 1) i range(h) range h if not s[i][j] == "#":
            ans = max(ans, t[i][j] + cnt[s[i][j]] - 1) not s[i][j] == "#" s[i][j] == "#" s[i][j] [i] s i j "#" ans = max(ans, t[i][j] + cnt[s[i][j]] - 1) ans max(ans, t[i][j] + cnt[s[i][j]] - 1) max ans t[i][j] + cnt[s[i][j]] - 1 t[i][j] + cnt[s[i][j]] t[i][j] [i] t i j cnt[s[i][j]] cnt s[i][j] [i] s i j 1 print(ans) print ans h, w = map(int, input().split()) map(int, input().split()) h x = 1 1 x x = 1 1 x w = map(int, input().split()) map(int, input().split()) w cnt = [0] * 2005 [0] * 2005 cnt x += 1 1 x x += 1 1 x t = [[-1] * w for _ in range(h)] [[-1] * w for _ in range(h)] t ans = max(ans, t[i][j] + cnt[s[i][j]] - 1) max(ans, t[i][j] + cnt[s[i][j]] - 1) ans ans = 0 0 ans s = [list(input()) for _ in range(h)] [list(input()) for _ in range(h)] s
h, w = map(int, input().split())
s = [list(input()) for _ in range(h)]
t = [[-1] * w for _ in range(h)]
cnt = [0] * 2005
ans = 0
for i in range(h):
    x = 1
    cnt[1] = 0
    for j in range(w):
        if s[i][j] == ".":
            t[i][j] = x
            cnt[x] += 1
        else:
            x += 1
            cnt[x] = 0
    for j in range(w):
        if not t[i][j] == -1:
            t[i][j] = cnt[t[i][j]]
for j in range(w):
    x = 1
    cnt[1] = 0
    for i in range(h):
        if s[i][j] == ".":
            s[i][j] = x
            cnt[x] += 1
        else:
            x += 1
            cnt[x] = 0
    for i in range(h):
        if not s[i][j] == "#":
            ans = max(ans, t[i][j] + cnt[s[i][j]] - 1)
print(ans)