H,W = map(int,input().split())
data = [list(input()) for i in range(H)]

A = [[0]*(W) for i in range(H)]
B = [[0]*(W) for i in range(H)]

for i in range(H):
    a = 0
    f = 0
    t = 0
    for j in range(W):
        if data[i][j] == '.' and j < W-1:
            a += 1
            t += 1
        elif data[i][j] == '#':
            for k in range(f,t):
                A[i][k] = a
            t = j+1
            f = j+1
            a = 0
        else:
            for k in range(f,t+1):
                A[i][k] = a+1
for j in range(W):
    b = 0
    f = 0
    t = 0
    for i in range(H):
        if data[i][j] == '.' and i < H-1:
            b += 1
            t += 1
        elif data[i][j] == '#':
            for k in range(f,t):
                B[k][j] = b
            t = i+1
            f = i+1
            b = 0
        else:
            for k in range(f,t+1):
                B[k][j] = b+1
ans = 0
for i in range(H):
    for j in range(W):
        ans = max(ans,A[i][j]+B[i][j])
print(ans-1) H,W = map(int,input().split()) H map(int,input().split()) map int input().split() ().split () input split W list(input()) for i in range(H) for i in range(H) i range(H) range H for i in range(H) list(input()) list input() input data = [list(input()) for i in range(H)] data [list(input()) for i in range(H)] [0]*(W) for i in range(H) for i in range(H) i range(H) range H for i in range(H) [0]*(W) [0] 0 W A = [[0]*(W) for i in range(H)] A [[0]*(W) for i in range(H)] [0]*(W) for i in range(H) for i in range(H) i range(H) range H for i in range(H) [0]*(W) [0] 0 W B = [[0]*(W) for i in range(H)] B [[0]*(W) for i in range(H)] for i in range(H):
    a = 0
    f = 0
    t = 0
    for j in range(W):
        if data[i][j] == '.' and j < W-1:
            a += 1
            t += 1
        elif data[i][j] == '#':
            for k in range(f,t):
                A[i][k] = a
            t = j+1
            f = j+1
            a = 0
        else:
            for k in range(f,t+1):
                A[i][k] = a+1 i range(H) range H a = 0 a 0 f = 0 f 0 t = 0 t 0 for j in range(W):
        if data[i][j] == '.' and j < W-1:
            a += 1
            t += 1
        elif data[i][j] == '#':
            for k in range(f,t):
                A[i][k] = a
            t = j+1
            f = j+1
            a = 0
        else:
            for k in range(f,t+1):
                A[i][k] = a+1 j range(W) range W if data[i][j] == '.' and j < W-1:
            a += 1
            t += 1
        elif data[i][j] == '#':
            for k in range(f,t):
                A[i][k] = a
            t = j+1
            f = j+1
            a = 0
        else:
            for k in range(f,t+1):
                A[i][k] = a+1 data[i][j] == '.' and j < W-1 data[i][j] == '.' data[i][j] [i] data i j '.' j < W-1 j W-1 W 1 a += 1 a 1 t += 1 t 1 elif data[i][j] == '#':
            for k in range(f,t):
                A[i][k] = a
            t = j+1
            f = j+1
            a = 0
         data[i][j] == '#' data[i][j] [i] data i j '#' for k in range(f,t):
                A[i][k] = a
             k range(f,t) range f t A[i][k] = a A[i][k] [i] A i k a t = j+1 t j+1 j 1 f = j+1 f j+1 j 1 a = 0 a 0 for k in range(f,t+1):
                A[i][k] = a+1 k range(f,t+1) range f t+1 t 1 A[i][k] = a+1 A[i][k] [i] A i k a+1 a 1 for j in range(W):
    b = 0
    f = 0
    t = 0
    for i in range(H):
        if data[i][j] == '.' and i < H-1:
            b += 1
            t += 1
        elif data[i][j] == '#':
            for k in range(f,t):
                B[k][j] = b
            t = i+1
            f = i+1
            b = 0
        else:
            for k in range(f,t+1):
                B[k][j] = b+1 j range(W) range W b = 0 b 0 f = 0 f 0 t = 0 t 0 for i in range(H):
        if data[i][j] == '.' and i < H-1:
            b += 1
            t += 1
        elif data[i][j] == '#':
            for k in range(f,t):
                B[k][j] = b
            t = i+1
            f = i+1
            b = 0
        else:
            for k in range(f,t+1):
                B[k][j] = b+1 i range(H) range H if data[i][j] == '.' and i < H-1:
            b += 1
            t += 1
        elif data[i][j] == '#':
            for k in range(f,t):
                B[k][j] = b
            t = i+1
            f = i+1
            b = 0
        else:
            for k in range(f,t+1):
                B[k][j] = b+1 data[i][j] == '.' and i < H-1 data[i][j] == '.' data[i][j] [i] data i j '.' i < H-1 i H-1 H 1 b += 1 b 1 t += 1 t 1 elif data[i][j] == '#':
            for k in range(f,t):
                B[k][j] = b
            t = i+1
            f = i+1
            b = 0
         data[i][j] == '#' data[i][j] [i] data i j '#' for k in range(f,t):
                B[k][j] = b
             k range(f,t) range f t B[k][j] = b B[k][j] [k] B k j b t = i+1 t i+1 i 1 f = i+1 f i+1 i 1 b = 0 b 0 for k in range(f,t+1):
                B[k][j] = b+1 k range(f,t+1) range f t+1 t 1 B[k][j] = b+1 B[k][j] [k] B k j b+1 b 1 ans = 0 ans 0 for i in range(H):
    for j in range(W):
        ans = max(ans,A[i][j]+B[i][j]) i range(H) range H for j in range(W):
        ans = max(ans,A[i][j]+B[i][j]) j range(W) range W ans = max(ans,A[i][j]+B[i][j]) ans max(ans,A[i][j]+B[i][j]) max ans A[i][j]+B[i][j] A[i][j] [i] A i j B[i][j] [i] B i j print(ans-1) print ans-1 ans 1 t += 1 1 t b += 1 1 b t = 0 0 t t = i+1 i+1 t ans = max(ans,A[i][j]+B[i][j]) max(ans,A[i][j]+B[i][j]) ans a = 0 0 a A = [[0]*(W) for i in range(H)] [[0]*(W) for i in range(H)] A H,W = map(int,input().split()) map(int,input().split()) H B = [[0]*(W) for i in range(H)] [[0]*(W) for i in range(H)] B W = map(int,input().split()) map(int,input().split()) W f = 0 0 f f = j+1 j+1 f ans = 0 0 ans f = 0 0 f t = 0 0 t a = 0 0 a t += 1 1 t t = j+1 j+1 t b = 0 0 b f = i+1 i+1 f b = 0 0 b data = [list(input()) for i in range(H)] [list(input()) for i in range(H)] data a += 1 1 a
H,W = map(int,input().split())
data = [list(input()) for i in range(H)]

A = [[0]*(W) for i in range(H)]
B = [[0]*(W) for i in range(H)]

for i in range(H):
    a = 0
    f = 0
    t = 0
    for j in range(W):
        if data[i][j] == '.' and j < W-1:
            a += 1
            t += 1
        elif data[i][j] == '#':
            for k in range(f,t):
                A[i][k] = a
            t = j+1
            f = j+1
            a = 0
        else:
            for k in range(f,t+1):
                A[i][k] = a+1
for j in range(W):
    b = 0
    f = 0
    t = 0
    for i in range(H):
        if data[i][j] == '.' and i < H-1:
            b += 1
            t += 1
        elif data[i][j] == '#':
            for k in range(f,t):
                B[k][j] = b
            t = i+1
            f = i+1
            b = 0
        else:
            for k in range(f,t+1):
                B[k][j] = b+1
ans = 0
for i in range(H):
    for j in range(W):
        ans = max(ans,A[i][j]+B[i][j])
print(ans-1)