H,W = map(int,input().split())
T = []
for i in range(H):
    a = list(input())
    T.append(a)

result = [[0]*W for _ in range(H)]
for i in range(H):
    c = 0
    start = 0
    for j in range(W):
        if T[i][j] == "#":
            for k in range(start,j):
                result[i][k] += c
            start = j + 1
            c = 0
        elif j == W-1:
            c += 1
            for k in range(start,j+1):
                result[i][k] += c
        else:
            c += 1

for i in range(W):
    c = 0
    start = 0
    for j in range(H):
        if T[j][i] == "#":
            for k in range(start,j):
                result[k][i] += c
            start = j + 1
            c = 0
        elif j == H-1:
            c += 1
            for k in range(start,j+1):
                result[k][i] += c
        else:
            c += 1

ans = 0
for i in range(H):
    for j in range(W):
        if T[i][j] == ".":
            ans = max(ans,result[i][j]-1)
        else:
            ans = max(ans,result[i][j])
print(ans) H,W = map(int,input().split()) H map(int,input().split()) map int input().split() ().split () input split W T = [] T [] for i in range(H):
    a = list(input())
    T.append(a) i range(H) range H a = list(input()) a list(input()) list input() input T.append(a) T.append T append a [0]*W for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) [0]*W [0] 0 W result = [[0]*W for _ in range(H)] result [[0]*W for _ in range(H)] for i in range(H):
    c = 0
    start = 0
    for j in range(W):
        if T[i][j] == "#":
            for k in range(start,j):
                result[i][k] += c
            start = j + 1
            c = 0
        elif j == W-1:
            c += 1
            for k in range(start,j+1):
                result[i][k] += c
        else:
            c += 1 i range(H) range H c = 0 c 0 start = 0 start 0 for j in range(W):
        if T[i][j] == "#":
            for k in range(start,j):
                result[i][k] += c
            start = j + 1
            c = 0
        elif j == W-1:
            c += 1
            for k in range(start,j+1):
                result[i][k] += c
        else:
            c += 1 j range(W) range W if T[i][j] == "#":
            for k in range(start,j):
                result[i][k] += c
            start = j + 1
            c = 0
        elif j == W-1:
            c += 1
            for k in range(start,j+1):
                result[i][k] += c
        else:
            c += 1 T[i][j] == "#" T[i][j] [i] T i j "#" for k in range(start,j):
                result[i][k] += c
             k range(start,j) range start j result[i][k] += c result[i][k] [i] result i k c start = j + 1 start j + 1 j 1 c = 0 c 0 elif j == W-1:
            c += 1
            for k in range(start,j+1):
                result[i][k] += c
         j == W-1 j W-1 W 1 c += 1 c 1 for k in range(start,j+1):
                result[i][k] += c
         k range(start,j+1) range start j+1 j 1 result[i][k] += c result[i][k] [i] result i k c c += 1 c 1 for i in range(W):
    c = 0
    start = 0
    for j in range(H):
        if T[j][i] == "#":
            for k in range(start,j):
                result[k][i] += c
            start = j + 1
            c = 0
        elif j == H-1:
            c += 1
            for k in range(start,j+1):
                result[k][i] += c
        else:
            c += 1 i range(W) range W c = 0 c 0 start = 0 start 0 for j in range(H):
        if T[j][i] == "#":
            for k in range(start,j):
                result[k][i] += c
            start = j + 1
            c = 0
        elif j == H-1:
            c += 1
            for k in range(start,j+1):
                result[k][i] += c
        else:
            c += 1 j range(H) range H if T[j][i] == "#":
            for k in range(start,j):
                result[k][i] += c
            start = j + 1
            c = 0
        elif j == H-1:
            c += 1
            for k in range(start,j+1):
                result[k][i] += c
        else:
            c += 1 T[j][i] == "#" T[j][i] [j] T j i "#" for k in range(start,j):
                result[k][i] += c
             k range(start,j) range start j result[k][i] += c result[k][i] [k] result k i c start = j + 1 start j + 1 j 1 c = 0 c 0 elif j == H-1:
            c += 1
            for k in range(start,j+1):
                result[k][i] += c
         j == H-1 j H-1 H 1 c += 1 c 1 for k in range(start,j+1):
                result[k][i] += c
         k range(start,j+1) range start j+1 j 1 result[k][i] += c result[k][i] [k] result k i c c += 1 c 1 ans = 0 ans 0 for i in range(H):
    for j in range(W):
        if T[i][j] == ".":
            ans = max(ans,result[i][j]-1)
        else:
            ans = max(ans,result[i][j]) i range(H) range H for j in range(W):
        if T[i][j] == ".":
            ans = max(ans,result[i][j]-1)
        else:
            ans = max(ans,result[i][j]) j range(W) range W if T[i][j] == ".":
            ans = max(ans,result[i][j]-1)
        else:
            ans = max(ans,result[i][j]) T[i][j] == "." T[i][j] [i] T i j "." ans = max(ans,result[i][j]-1) ans max(ans,result[i][j]-1) max ans result[i][j]-1 result[i][j] [i] result i j 1 ans = max(ans,result[i][j]) ans max(ans,result[i][j]) max ans result[i][j] [i] result i j print(ans) print ans start = j + 1 j + 1 start c += 1 1 c c += 1 1 c c = 0 0 c c += 1 1 c start = j + 1 j + 1 start c = 0 0 c T = [] [] T c = 0 0 c start = 0 0 start ans = 0 0 ans ans = max(ans,result[i][j]) max(ans,result[i][j]) ans ans = max(ans,result[i][j]-1) max(ans,result[i][j]-1) ans W = map(int,input().split()) map(int,input().split()) W a = list(input()) list(input()) a H,W = map(int,input().split()) map(int,input().split()) H result = [[0]*W for _ in range(H)] [[0]*W for _ in range(H)] result c = 0 0 c c += 1 1 c start = 0 0 start
H,W = map(int,input().split())
T = []
for i in range(H):
    a = list(input())
    T.append(a)

result = [[0]*W for _ in range(H)]
for i in range(H):
    c = 0
    start = 0
    for j in range(W):
        if T[i][j] == "#":
            for k in range(start,j):
                result[i][k] += c
            start = j + 1
            c = 0
        elif j == W-1:
            c += 1
            for k in range(start,j+1):
                result[i][k] += c
        else:
            c += 1

for i in range(W):
    c = 0
    start = 0
    for j in range(H):
        if T[j][i] == "#":
            for k in range(start,j):
                result[k][i] += c
            start = j + 1
            c = 0
        elif j == H-1:
            c += 1
            for k in range(start,j+1):
                result[k][i] += c
        else:
            c += 1

ans = 0
for i in range(H):
    for j in range(W):
        if T[i][j] == ".":
            ans = max(ans,result[i][j]-1)
        else:
            ans = max(ans,result[i][j])
print(ans)