H, W = map(int, input().split())
S = [input() for _ in range(H)]

yoko = [[0]*W for _ in range(H)]
tate = [[0]*W for _ in range(H)]

def f(l):
    print("\n".join("".join(map(str, row)) for row in l))

for h in range(H):
    if S[h][0] == ".":
        yoko[h][0] = 1
    else:
        yoko[h][0] = 0

for h in range(H):
    for w in range(1, W):
        if S[h][w] == ".":
            yoko[h][w] = yoko[h][w-1]+1
        else:
            yoko[h][w] = 0

for h in range(H):
    for w in range(W-2, -1, -1):
        if S[h][w]=="." and S[h][w+1]==".":
            yoko[h][w] = yoko[h][w+1]

for w in range(W):
    if S[0][w] == ".":
        tate[0][w] = 1
    else:
        tate[0][w] = 0

for w in range(W):
    for h in range(1, H):
        if S[h][w] == ".":
            tate[h][w] = tate[h-1][w]+1
        else:
            tate[h][w] = 0

for w in range(W):
    for h in range(H-2, -1, -1):
        if S[h][w]=="." and S[h+1][w]==".":
            tate[h][w] = tate[h+1][w]

ans = 0

for h in range(H):
    for w in range(W):
        ans = max(yoko[h][w]+tate[h][w]-1, ans)

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 yoko = [[0]*W for _ in range(H)] yoko [[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 tate = [[0]*W for _ in range(H)] tate [[0]*W for _ in range(H)] def f(l):
    print("\n".join("".join(map(str, row)) for row in l)) f print("\n".join("".join(map(str, row)) for row in l)) print "\n".join("".join(map(str, row)) for row in l) "\n".join "\n" join "".join(map(str, row)) "".join "" join map(str, row) map str row l l for h in range(H):
    if S[h][0] == ".":
        yoko[h][0] = 1
    else:
        yoko[h][0] = 0 h range(H) range H if S[h][0] == ".":
        yoko[h][0] = 1
    else:
        yoko[h][0] = 0 S[h][0] == "." S[h][0] [h] S h 0 "." yoko[h][0] = 1 yoko[h][0] [h] yoko h 0 1 yoko[h][0] = 0 yoko[h][0] [h] yoko h 0 0 for h in range(H):
    for w in range(1, W):
        if S[h][w] == ".":
            yoko[h][w] = yoko[h][w-1]+1
        else:
            yoko[h][w] = 0 h range(H) range H for w in range(1, W):
        if S[h][w] == ".":
            yoko[h][w] = yoko[h][w-1]+1
        else:
            yoko[h][w] = 0 w range(1, W) range 1 W if S[h][w] == ".":
            yoko[h][w] = yoko[h][w-1]+1
        else:
            yoko[h][w] = 0 S[h][w] == "." S[h][w] [h] S h w "." yoko[h][w] = yoko[h][w-1]+1 yoko[h][w] [h] yoko h w yoko[h][w-1]+1 yoko[h][w-1] [h] yoko h w-1 w 1 1 yoko[h][w] = 0 yoko[h][w] [h] yoko h w 0 for h in range(H):
    for w in range(W-2, -1, -1):
        if S[h][w]=="." and S[h][w+1]==".":
            yoko[h][w] = yoko[h][w+1] h range(H) range H for w in range(W-2, -1, -1):
        if S[h][w]=="." and S[h][w+1]==".":
            yoko[h][w] = yoko[h][w+1] w range(W-2, -1, -1) range W-2 W 2 -1 -1 if S[h][w]=="." and S[h][w+1]==".":
            yoko[h][w] = yoko[h][w+1] S[h][w]=="." and S[h][w+1]=="." S[h][w]=="." S[h][w] [h] S h w "." S[h][w+1]=="." S[h][w+1] [h] S h w+1 w 1 "." yoko[h][w] = yoko[h][w+1] yoko[h][w] [h] yoko h w yoko[h][w+1] [h] yoko h w+1 w 1 for w in range(W):
    if S[0][w] == ".":
        tate[0][w] = 1
    else:
        tate[0][w] = 0 w range(W) range W if S[0][w] == ".":
        tate[0][w] = 1
    else:
        tate[0][w] = 0 S[0][w] == "." S[0][w] [0] S 0 w "." tate[0][w] = 1 tate[0][w] [0] tate 0 w 1 tate[0][w] = 0 tate[0][w] [0] tate 0 w 0 for w in range(W):
    for h in range(1, H):
        if S[h][w] == ".":
            tate[h][w] = tate[h-1][w]+1
        else:
            tate[h][w] = 0 w range(W) range W for h in range(1, H):
        if S[h][w] == ".":
            tate[h][w] = tate[h-1][w]+1
        else:
            tate[h][w] = 0 h range(1, H) range 1 H if S[h][w] == ".":
            tate[h][w] = tate[h-1][w]+1
        else:
            tate[h][w] = 0 S[h][w] == "." S[h][w] [h] S h w "." tate[h][w] = tate[h-1][w]+1 tate[h][w] [h] tate h w tate[h-1][w]+1 tate[h-1][w] [h-1] tate h-1 h 1 w 1 tate[h][w] = 0 tate[h][w] [h] tate h w 0 for w in range(W):
    for h in range(H-2, -1, -1):
        if S[h][w]=="." and S[h+1][w]==".":
            tate[h][w] = tate[h+1][w] w range(W) range W for h in range(H-2, -1, -1):
        if S[h][w]=="." and S[h+1][w]==".":
            tate[h][w] = tate[h+1][w] h range(H-2, -1, -1) range H-2 H 2 -1 -1 if S[h][w]=="." and S[h+1][w]==".":
            tate[h][w] = tate[h+1][w] S[h][w]=="." and S[h+1][w]=="." S[h][w]=="." S[h][w] [h] S h w "." S[h+1][w]=="." S[h+1][w] [h+1] S h+1 h 1 w "." tate[h][w] = tate[h+1][w] tate[h][w] [h] tate h w tate[h+1][w] [h+1] tate h+1 h 1 w ans = 0 ans 0 for h in range(H):
    for w in range(W):
        ans = max(yoko[h][w]+tate[h][w]-1, ans) h range(H) range H for w in range(W):
        ans = max(yoko[h][w]+tate[h][w]-1, ans) w range(W) range W ans = max(yoko[h][w]+tate[h][w]-1, ans) ans max(yoko[h][w]+tate[h][w]-1, ans) max yoko[h][w]+tate[h][w]-1 yoko[h][w]+tate[h][w] yoko[h][w] [h] yoko h w tate[h][w] [h] tate h w 1 ans print(ans) print ans def f(l):
    print("\n".join("".join(map(str, row)) for row in l)) def f(l):
    print("\n".join("".join(map(str, row)) for row in l)) f yoko = [[0]*W for _ in range(H)] [[0]*W for _ in range(H)] yoko tate = [[0]*W for _ in range(H)] [[0]*W for _ in range(H)] tate S = [input() for _ in range(H)] [input() for _ in range(H)] S ans = 0 0 ans ans = max(yoko[h][w]+tate[h][w]-1, ans) max(yoko[h][w]+tate[h][w]-1, ans) ans W = map(int, input().split()) map(int, input().split()) W H, W = map(int, input().split()) map(int, input().split()) H
H, W = map(int, input().split())
S = [input() for _ in range(H)]

yoko = [[0]*W for _ in range(H)]
tate = [[0]*W for _ in range(H)]

def f(l):
    print("\n".join("".join(map(str, row)) for row in l))

for h in range(H):
    if S[h][0] == ".":
        yoko[h][0] = 1
    else:
        yoko[h][0] = 0

for h in range(H):
    for w in range(1, W):
        if S[h][w] == ".":
            yoko[h][w] = yoko[h][w-1]+1
        else:
            yoko[h][w] = 0

for h in range(H):
    for w in range(W-2, -1, -1):
        if S[h][w]=="." and S[h][w+1]==".":
            yoko[h][w] = yoko[h][w+1]

for w in range(W):
    if S[0][w] == ".":
        tate[0][w] = 1
    else:
        tate[0][w] = 0

for w in range(W):
    for h in range(1, H):
        if S[h][w] == ".":
            tate[h][w] = tate[h-1][w]+1
        else:
            tate[h][w] = 0

for w in range(W):
    for h in range(H-2, -1, -1):
        if S[h][w]=="." and S[h+1][w]==".":
            tate[h][w] = tate[h+1][w]

ans = 0

for h in range(H):
    for w in range(W):
        ans = max(yoko[h][w]+tate[h][w]-1, ans)

print(ans)