h, w = map(int, input().split())
s = [input() for _ in range(h)]
hrz = [[0] * w for _ in range(h)]
vrt = [[0] * w for _ in range(h)]
for i in range(h):
    cnt = 0
    for j in range(w + 1):
        if j < w and s[i][j] == '.':
            if cnt == 0:
                start = j
            cnt += 1
        elif cnt > 0:
            for k in range(start, j):
                hrz[i][k] = cnt
            cnt = 0
for j in range(w):
    cnt = 0
    for i in range(h + 1):
        if i < h and s[i][j] == '.':
            if cnt == 0:
                start = i
            cnt += 1
        elif cnt > 0:
            for k in range(start, i):
                vrt[k][j] = cnt
            cnt = 0
ans = max(hrz[i][j] + vrt[i][j] - 1 for i in range(h) for j in range(w))
print(ans) 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)] [0] * w for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) [0] * w [0] 0 w hrz = [[0] * w for _ in range(h)] hrz [[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 vrt = [[0] * w for _ in range(h)] vrt [[0] * w for _ in range(h)] for i in range(h):
    cnt = 0
    for j in range(w + 1):
        if j < w and s[i][j] == '.':
            if cnt == 0:
                start = j
            cnt += 1
        elif cnt > 0:
            for k in range(start, j):
                hrz[i][k] = cnt
            cnt = 0 i range(h) range h cnt = 0 cnt 0 for j in range(w + 1):
        if j < w and s[i][j] == '.':
            if cnt == 0:
                start = j
            cnt += 1
        elif cnt > 0:
            for k in range(start, j):
                hrz[i][k] = cnt
            cnt = 0 j range(w + 1) range w + 1 w 1 if j < w and s[i][j] == '.':
            if cnt == 0:
                start = j
            cnt += 1
        elif cnt > 0:
            for k in range(start, j):
                hrz[i][k] = cnt
            cnt = 0 j < w and s[i][j] == '.' j < w j w s[i][j] == '.' s[i][j] [i] s i j '.' if cnt == 0:
                start = j
             cnt == 0 cnt 0 start = j start j cnt += 1 cnt 1 elif cnt > 0:
            for k in range(start, j):
                hrz[i][k] = cnt
            cnt = 0 cnt > 0 cnt 0 for k in range(start, j):
                hrz[i][k] = cnt
             k range(start, j) range start j hrz[i][k] = cnt hrz[i][k] [i] hrz i k cnt cnt = 0 cnt 0 for j in range(w):
    cnt = 0
    for i in range(h + 1):
        if i < h and s[i][j] == '.':
            if cnt == 0:
                start = i
            cnt += 1
        elif cnt > 0:
            for k in range(start, i):
                vrt[k][j] = cnt
            cnt = 0 j range(w) range w cnt = 0 cnt 0 for i in range(h + 1):
        if i < h and s[i][j] == '.':
            if cnt == 0:
                start = i
            cnt += 1
        elif cnt > 0:
            for k in range(start, i):
                vrt[k][j] = cnt
            cnt = 0 i range(h + 1) range h + 1 h 1 if i < h and s[i][j] == '.':
            if cnt == 0:
                start = i
            cnt += 1
        elif cnt > 0:
            for k in range(start, i):
                vrt[k][j] = cnt
            cnt = 0 i < h and s[i][j] == '.' i < h i h s[i][j] == '.' s[i][j] [i] s i j '.' if cnt == 0:
                start = i
             cnt == 0 cnt 0 start = i start i cnt += 1 cnt 1 elif cnt > 0:
            for k in range(start, i):
                vrt[k][j] = cnt
            cnt = 0 cnt > 0 cnt 0 for k in range(start, i):
                vrt[k][j] = cnt
             k range(start, i) range start i vrt[k][j] = cnt vrt[k][j] [k] vrt k j cnt cnt = 0 cnt 0 ans = max(hrz[i][j] + vrt[i][j] - 1 for i in range(h) for j in range(w)) ans max(hrz[i][j] + vrt[i][j] - 1 for i in range(h) for j in range(w)) max hrz[i][j] + vrt[i][j] - 1 hrz[i][j] + vrt[i][j] hrz[i][j] [i] hrz i j vrt[i][j] [i] vrt i j 1 print(ans) print ans start = j j start h, w = map(int, input().split()) map(int, input().split()) h hrz = [[0] * w for _ in range(h)] [[0] * w for _ in range(h)] hrz cnt = 0 0 cnt ans = max(hrz[i][j] + vrt[i][j] - 1 for i in range(h) for j in range(w)) max(hrz[i][j] + vrt[i][j] - 1 for i in range(h) for j in range(w)) ans s = [input() for _ in range(h)] [input() for _ in range(h)] s w = map(int, input().split()) map(int, input().split()) w cnt = 0 0 cnt vrt = [[0] * w for _ in range(h)] [[0] * w for _ in range(h)] vrt start = i i start cnt = 0 0 cnt cnt += 1 1 cnt cnt += 1 1 cnt cnt = 0 0 cnt
h, w = map(int, input().split())
s = [input() for _ in range(h)]
hrz = [[0] * w for _ in range(h)]
vrt = [[0] * w for _ in range(h)]
for i in range(h):
    cnt = 0
    for j in range(w + 1):
        if j < w and s[i][j] == '.':
            if cnt == 0:
                start = j
            cnt += 1
        elif cnt > 0:
            for k in range(start, j):
                hrz[i][k] = cnt
            cnt = 0
for j in range(w):
    cnt = 0
    for i in range(h + 1):
        if i < h and s[i][j] == '.':
            if cnt == 0:
                start = i
            cnt += 1
        elif cnt > 0:
            for k in range(start, i):
                vrt[k][j] = cnt
            cnt = 0
ans = max(hrz[i][j] + vrt[i][j] - 1 for i in range(h) for j in range(w))
print(ans)
