h, w = map(int, input().split())
s = []
for i in range(h):
    s.append(input())
ans = [[0 for j in range(w)] for i in range(h)]
for i in range(h):
    done = [False] * w
    for j in range(w):
        if s[i][j] == "#":
            continue
        if done[j]:
            continue
        l = 0
        while j+l < w:
            if s[i][j+l] == "#":
                break
            l += 1
        for k in range(j, j+l):
            ans[i][k] += l
            done[k] = True
for j in range(w):
    done = [False] * h
    for i in range(h):
        if s[i][j] == "#":
            continue
        if done[i]:
            continue
        l = 0
        while i+l < h:
            if s[i+l][j] == "#":
                break
            l += 1
        for k in range(i, i+l):
            ans[k][j] += l
            done[k] = True
res = 0
for i in range(h):
    res = max(max(ans[i]), res)
res -= 1
print(res) h, w = map(int, input().split()) h map(int, input().split()) map int input().split() ().split () input split w s = [] s [] for i in range(h):
    s.append(input()) i range(h) range h s.append(input()) s.append s append input() input [0 for j in range(w)] for i in range(h) for i in range(h) i range(h) range h for i in range(h) [0 for j in range(w)] ans = [[0 for j in range(w)] for i in range(h)] ans [[0 for j in range(w)] for i in range(h)] for i in range(h):
    done = [False] * w
    for j in range(w):
        if s[i][j] == "#":
            continue
        if done[j]:
            continue
        l = 0
        while j+l < w:
            if s[i][j+l] == "#":
                break
            l += 1
        for k in range(j, j+l):
            ans[i][k] += l
            done[k] = True i range(h) range h done = [False] * w done [False] * w [False] False w for j in range(w):
        if s[i][j] == "#":
            continue
        if done[j]:
            continue
        l = 0
        while j+l < w:
            if s[i][j+l] == "#":
                break
            l += 1
        for k in range(j, j+l):
            ans[i][k] += l
            done[k] = True j range(w) range w if s[i][j] == "#":
            continue
         s[i][j] == "#" s[i][j] [i] s i j "#" continue if done[j]:
            continue
         done[j] done j continue l = 0 l 0 while j+l < w:
            if s[i][j+l] == "#":
                break
            l += 1
         j+l < w j+l j l w if s[i][j+l] == "#":
                break
             s[i][j+l] == "#" s[i][j+l] [i] s i j+l j l "#" break l += 1 l 1 for k in range(j, j+l):
            ans[i][k] += l
            done[k] = True k range(j, j+l) range j j+l j l ans[i][k] += l ans[i][k] [i] ans i k l done[k] = True done[k] done k True for j in range(w):
    done = [False] * h
    for i in range(h):
        if s[i][j] == "#":
            continue
        if done[i]:
            continue
        l = 0
        while i+l < h:
            if s[i+l][j] == "#":
                break
            l += 1
        for k in range(i, i+l):
            ans[k][j] += l
            done[k] = True j range(w) range w done = [False] * h done [False] * h [False] False h for i in range(h):
        if s[i][j] == "#":
            continue
        if done[i]:
            continue
        l = 0
        while i+l < h:
            if s[i+l][j] == "#":
                break
            l += 1
        for k in range(i, i+l):
            ans[k][j] += l
            done[k] = True i range(h) range h if s[i][j] == "#":
            continue
         s[i][j] == "#" s[i][j] [i] s i j "#" continue if done[i]:
            continue
         done[i] done i continue l = 0 l 0 while i+l < h:
            if s[i+l][j] == "#":
                break
            l += 1
         i+l < h i+l i l h if s[i+l][j] == "#":
                break
             s[i+l][j] == "#" s[i+l][j] [i+l] s i+l i l j "#" break l += 1 l 1 for k in range(i, i+l):
            ans[k][j] += l
            done[k] = True k range(i, i+l) range i i+l i l ans[k][j] += l ans[k][j] [k] ans k j l done[k] = True done[k] done k True res = 0 res 0 for i in range(h):
    res = max(max(ans[i]), res) i range(h) range h res = max(max(ans[i]), res) res max(max(ans[i]), res) max max(ans[i]) max ans[i] ans i res res -= 1 res 1 print(res) print res l += 1 1 l l += 1 1 l done = [False] * h [False] * h done done = [False] * w [False] * w done s = [] [] s res = 0 0 res res -= 1 1 res h, w = map(int, input().split()) map(int, input().split()) h ans = [[0 for j in range(w)] for i in range(h)] [[0 for j in range(w)] for i in range(h)] ans res = max(max(ans[i]), res) max(max(ans[i]), res) res w = map(int, input().split()) map(int, input().split()) w l = 0 0 l l = 0 0 l
h, w = map(int, input().split())
s = []
for i in range(h):
    s.append(input())
ans = [[0 for j in range(w)] for i in range(h)]
for i in range(h):
    done = [False] * w
    for j in range(w):
        if s[i][j] == "#":
            continue
        if done[j]:
            continue
        l = 0
        while j+l < w:
            if s[i][j+l] == "#":
                break
            l += 1
        for k in range(j, j+l):
            ans[i][k] += l
            done[k] = True
for j in range(w):
    done = [False] * h
    for i in range(h):
        if s[i][j] == "#":
            continue
        if done[i]:
            continue
        l = 0
        while i+l < h:
            if s[i+l][j] == "#":
                break
            l += 1
        for k in range(i, i+l):
            ans[k][j] += l
            done[k] = True
res = 0
for i in range(h):
    res = max(max(ans[i]), res)
res -= 1
print(res)