h, w = map(int, input().split())
s = [input() for i in range(h)]

yoko = [[0] * w for i in range(h)]
for i in range(h):
    tmp = 0
    l = 0
    for j in range(w + 1):
        if j == w or s[i][j] == "#":
            for k in range(l, j):
                yoko[i][k] = tmp
            l = j + 1
            tmp = 0
        else:
            tmp += 1
            
tate = [[0] * w for i in range(h)]
for j in range(w):
    tmp = 0
    l = 0
    for i in range(h + 1):
        if i == h or s[i][j] == "#":
            for k in range(l, i):
                tate[k][j] = tmp
            l = i + 1
            tmp = 0
        else:
            tmp += 1

ans = 0
for i in range(h):
    for j in range(w):
        ans = max(ans, tate[i][j] + yoko[i][j])
print(ans - 1) h, w = map(int, input().split()) h map(int, input().split()) map int input().split() ().split () input split w input() for i in range(h) for i in range(h) i range(h) range h for i in range(h) input() input s = [input() for i in range(h)] s [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 yoko = [[0] * w for i in range(h)] yoko [[0] * w for i in range(h)] for i in range(h):
    tmp = 0
    l = 0
    for j in range(w + 1):
        if j == w or s[i][j] == "#":
            for k in range(l, j):
                yoko[i][k] = tmp
            l = j + 1
            tmp = 0
        else:
            tmp += 1
             i range(h) range h tmp = 0 tmp 0 l = 0 l 0 for j in range(w + 1):
        if j == w or s[i][j] == "#":
            for k in range(l, j):
                yoko[i][k] = tmp
            l = j + 1
            tmp = 0
        else:
            tmp += 1
             j range(w + 1) range w + 1 w 1 if j == w or s[i][j] == "#":
            for k in range(l, j):
                yoko[i][k] = tmp
            l = j + 1
            tmp = 0
        else:
            tmp += 1
             j == w or s[i][j] == "#" j == w j w s[i][j] == "#" s[i][j] [i] s i j "#" for k in range(l, j):
                yoko[i][k] = tmp
             k range(l, j) range l j yoko[i][k] = tmp yoko[i][k] [i] yoko i k tmp l = j + 1 l j + 1 j 1 tmp = 0 tmp 0 tmp += 1 tmp 1 [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 tate = [[0] * w for i in range(h)] tate [[0] * w for i in range(h)] for j in range(w):
    tmp = 0
    l = 0
    for i in range(h + 1):
        if i == h or s[i][j] == "#":
            for k in range(l, i):
                tate[k][j] = tmp
            l = i + 1
            tmp = 0
        else:
            tmp += 1 j range(w) range w tmp = 0 tmp 0 l = 0 l 0 for i in range(h + 1):
        if i == h or s[i][j] == "#":
            for k in range(l, i):
                tate[k][j] = tmp
            l = i + 1
            tmp = 0
        else:
            tmp += 1 i range(h + 1) range h + 1 h 1 if i == h or s[i][j] == "#":
            for k in range(l, i):
                tate[k][j] = tmp
            l = i + 1
            tmp = 0
        else:
            tmp += 1 i == h or s[i][j] == "#" i == h i h s[i][j] == "#" s[i][j] [i] s i j "#" for k in range(l, i):
                tate[k][j] = tmp
             k range(l, i) range l i tate[k][j] = tmp tate[k][j] [k] tate k j tmp l = i + 1 l i + 1 i 1 tmp = 0 tmp 0 tmp += 1 tmp 1 ans = 0 ans 0 for i in range(h):
    for j in range(w):
        ans = max(ans, tate[i][j] + yoko[i][j]) i range(h) range h for j in range(w):
        ans = max(ans, tate[i][j] + yoko[i][j]) j range(w) range w ans = max(ans, tate[i][j] + yoko[i][j]) ans max(ans, tate[i][j] + yoko[i][j]) max ans tate[i][j] + yoko[i][j] tate[i][j] [i] tate i j yoko[i][j] [i] yoko i j print(ans - 1) print ans - 1 ans 1 tate = [[0] * w for i in range(h)] [[0] * w for i in range(h)] tate s = [input() for i in range(h)] [input() for i in range(h)] s ans = 0 0 ans l = i + 1 i + 1 l l = j + 1 j + 1 l w = map(int, input().split()) map(int, input().split()) w l = 0 0 l yoko = [[0] * w for i in range(h)] [[0] * w for i in range(h)] yoko tmp = 0 0 tmp ans = max(ans, tate[i][j] + yoko[i][j]) max(ans, tate[i][j] + yoko[i][j]) ans tmp = 0 0 tmp l = 0 0 l tmp += 1 1 tmp tmp = 0 0 tmp h, w = map(int, input().split()) map(int, input().split()) h tmp = 0 0 tmp tmp += 1 1 tmp
h, w = map(int, input().split())
s = [input() for i in range(h)]

yoko = [[0] * w for i in range(h)]
for i in range(h):
    tmp = 0
    l = 0
    for j in range(w + 1):
        if j == w or s[i][j] == "#":
            for k in range(l, j):
                yoko[i][k] = tmp
            l = j + 1
            tmp = 0
        else:
            tmp += 1
            
tate = [[0] * w for i in range(h)]
for j in range(w):
    tmp = 0
    l = 0
    for i in range(h + 1):
        if i == h or s[i][j] == "#":
            for k in range(l, i):
                tate[k][j] = tmp
            l = i + 1
            tmp = 0
        else:
            tmp += 1

ans = 0
for i in range(h):
    for j in range(w):
        ans = max(ans, tate[i][j] + yoko[i][j])
print(ans - 1)