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)]

for h in range(H):
    d = []
    for w in range(W):
        if S[h][w] == ".":
            d.append([h, w])
            if W != w+1: continue
        for h, w in d:
            yoko[h][w] = len(d)
        d = []

for w in range(W):
    d = []
    for h in range(H):
        if S[h][w] == ".":
            d.append([h, w])
            if H != h+1: continue
        for h, w in d:
            tate[h][w] = len(d)
        d = []
        
ans = 0
for h in range(H):
    for w in range(W):
        if ans < yoko[h][w]+tate[h][w]-1:
            ans = yoko[h][w]+tate[h][w]-1
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)] for h in range(H):
    d = []
    for w in range(W):
        if S[h][w] == ".":
            d.append([h, w])
            if W != w+1: continue
        for h, w in d:
            yoko[h][w] = len(d)
        d = [] h range(H) range H d = [] d [] for w in range(W):
        if S[h][w] == ".":
            d.append([h, w])
            if W != w+1: continue
        for h, w in d:
            yoko[h][w] = len(d)
        d = [] w range(W) range W if S[h][w] == ".":
            d.append([h, w])
            if W != w+1: continue
         S[h][w] == "." S[h][w] [h] S h w "." d.append([h, w]) d.append d append [h, w] h w if W != w+1: continue
         W != w+1 W w+1 w 1 for h, w in d:
            yoko[h][w] = len(d)
         h w d yoko[h][w] = len(d) yoko[h][w] [h] yoko h w len(d) len d d = [] d [] for w in range(W):
    d = []
    for h in range(H):
        if S[h][w] == ".":
            d.append([h, w])
            if H != h+1: continue
        for h, w in d:
            tate[h][w] = len(d)
        d = []
         w range(W) range W d = [] d [] for h in range(H):
        if S[h][w] == ".":
            d.append([h, w])
            if H != h+1: continue
        for h, w in d:
            tate[h][w] = len(d)
        d = []
         h range(H) range H if S[h][w] == ".":
            d.append([h, w])
            if H != h+1: continue
         S[h][w] == "." S[h][w] [h] S h w "." d.append([h, w]) d.append d append [h, w] h w if H != h+1: continue
         H != h+1 H h+1 h 1 for h, w in d:
            tate[h][w] = len(d)
         h w d tate[h][w] = len(d) tate[h][w] [h] tate h w len(d) len d d = [] d [] ans = 0 ans 0 for h in range(H):
    for w in range(W):
        if ans < yoko[h][w]+tate[h][w]-1:
            ans = yoko[h][w]+tate[h][w]-1 h range(H) range H for w in range(W):
        if ans < yoko[h][w]+tate[h][w]-1:
            ans = yoko[h][w]+tate[h][w]-1 w range(W) range W if ans < yoko[h][w]+tate[h][w]-1:
            ans = yoko[h][w]+tate[h][w]-1 ans < yoko[h][w]+tate[h][w]-1 ans 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 = yoko[h][w]+tate[h][w]-1 ans 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 print(ans) print ans ans = yoko[h][w]+tate[h][w]-1 yoko[h][w]+tate[h][w]-1 ans d = [] [] d d = [] [] d 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 yoko = [[0] * W for _ in range(H)] [[0] * W for _ in range(H)] yoko d = [] [] d W = map(int, input().split()) map(int, input().split()) W ans = 0 0 ans H, W = map(int, input().split()) map(int, input().split()) H d = [] [] d
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)]

for h in range(H):
    d = []
    for w in range(W):
        if S[h][w] == ".":
            d.append([h, w])
            if W != w+1: continue
        for h, w in d:
            yoko[h][w] = len(d)
        d = []

for w in range(W):
    d = []
    for h in range(H):
        if S[h][w] == ".":
            d.append([h, w])
            if H != h+1: continue
        for h, w in d:
            tate[h][w] = len(d)
        d = []
        
ans = 0
for h in range(H):
    for w in range(W):
        if ans < yoko[h][w]+tate[h][w]-1:
            ans = yoko[h][w]+tate[h][w]-1
print(ans)