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

cnt = [[0 for i in range(W)] for j in range(H)]

# 横
for i in range(H):
    done = [0] * W
    for j in range(W):
        if done[j]:
            continue
        if maze[i][j] == "#":
            continue
        l = 0
        while j + l < W:
            if maze[i][j+l] == "#":
                break
            l += 1
        for k in range(j,j+l):
            done[k] = 1
            cnt[i][k] += l





# 縦
for i in range(W):
    done = [0] * H
    for j in range(H):
        if done[j]:
            continue
        if maze[j][i] == "#":
            continue
        l = 0
        while j + l < H:
            if maze[j+l][i] == "#":
                break
            l += 1
        for k in range(j,j+l):
            done[k] = 1
            cnt[k][i] += l

ans = 0
for i in range(H):
    for j in range(W):
        ans = max(ans, cnt[i][j]-1)
print(ans) H, W = map(int, input().split()) H map(int, input().split()) map int input().split() ().split () input split W list(input()) for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) list(input()) list input() input maze = [list(input()) for _ in range(H)] maze [list(input()) for _ in range(H)] [0 for i in range(W)] for j in range(H) for j in range(H) j range(H) range H for j in range(H) [0 for i in range(W)] cnt = [[0 for i in range(W)] for j in range(H)] cnt [[0 for i in range(W)] for j in range(H)] for i in range(H):
    done = [0] * W
    for j in range(W):
        if done[j]:
            continue
        if maze[i][j] == "#":
            continue
        l = 0
        while j + l < W:
            if maze[i][j+l] == "#":
                break
            l += 1
        for k in range(j,j+l):
            done[k] = 1
            cnt[i][k] += l





# 縦 i range(H) range H done = [0] * W done [0] * W [0] 0 W for j in range(W):
        if done[j]:
            continue
        if maze[i][j] == "#":
            continue
        l = 0
        while j + l < W:
            if maze[i][j+l] == "#":
                break
            l += 1
        for k in range(j,j+l):
            done[k] = 1
            cnt[i][k] += l





# 縦 j range(W) range W if done[j]:
            continue
         done[j] done j continue if maze[i][j] == "#":
            continue
         maze[i][j] == "#" maze[i][j] [i] maze i j "#" continue l = 0 l 0 while j + l < W:
            if maze[i][j+l] == "#":
                break
            l += 1
         j + l < W j + l j l W if maze[i][j+l] == "#":
                break
             maze[i][j+l] == "#" maze[i][j+l] [i] maze i j+l j l "#" break l += 1 l 1 for k in range(j,j+l):
            done[k] = 1
            cnt[i][k] += l





# 縦 k range(j,j+l) range j j+l j l done[k] = 1 done[k] done k 1 cnt[i][k] += l cnt[i][k] [i] cnt i k l for i in range(W):
    done = [0] * H
    for j in range(H):
        if done[j]:
            continue
        if maze[j][i] == "#":
            continue
        l = 0
        while j + l < H:
            if maze[j+l][i] == "#":
                break
            l += 1
        for k in range(j,j+l):
            done[k] = 1
            cnt[k][i] += l i range(W) range W done = [0] * H done [0] * H [0] 0 H for j in range(H):
        if done[j]:
            continue
        if maze[j][i] == "#":
            continue
        l = 0
        while j + l < H:
            if maze[j+l][i] == "#":
                break
            l += 1
        for k in range(j,j+l):
            done[k] = 1
            cnt[k][i] += l j range(H) range H if done[j]:
            continue
         done[j] done j continue if maze[j][i] == "#":
            continue
         maze[j][i] == "#" maze[j][i] [j] maze j i "#" continue l = 0 l 0 while j + l < H:
            if maze[j+l][i] == "#":
                break
            l += 1
         j + l < H j + l j l H if maze[j+l][i] == "#":
                break
             maze[j+l][i] == "#" maze[j+l][i] [j+l] maze j+l j l i "#" break l += 1 l 1 for k in range(j,j+l):
            done[k] = 1
            cnt[k][i] += l k range(j,j+l) range j j+l j l done[k] = 1 done[k] done k 1 cnt[k][i] += l cnt[k][i] [k] cnt k i l ans = 0 ans 0 for i in range(H):
    for j in range(W):
        ans = max(ans, cnt[i][j]-1) i range(H) range H for j in range(W):
        ans = max(ans, cnt[i][j]-1) j range(W) range W ans = max(ans, cnt[i][j]-1) ans max(ans, cnt[i][j]-1) max ans cnt[i][j]-1 cnt[i][j] [i] cnt i j 1 print(ans) print ans l += 1 1 l l = 0 0 l l = 0 0 l W = map(int, input().split()) map(int, input().split()) W ans = max(ans, cnt[i][j]-1) max(ans, cnt[i][j]-1) ans H, W = map(int, input().split()) map(int, input().split()) H done = [0] * W [0] * W done done = [0] * H [0] * H done ans = 0 0 ans maze = [list(input()) for _ in range(H)] [list(input()) for _ in range(H)] maze cnt = [[0 for i in range(W)] for j in range(H)] [[0 for i in range(W)] for j in range(H)] cnt l += 1 1 l
H, W = map(int, input().split())
maze = [list(input()) for _ in range(H)]

cnt = [[0 for i in range(W)] for j in range(H)]

# 横
for i in range(H):
    done = [0] * W
    for j in range(W):
        if done[j]:
            continue
        if maze[i][j] == "#":
            continue
        l = 0
        while j + l < W:
            if maze[i][j+l] == "#":
                break
            l += 1
        for k in range(j,j+l):
            done[k] = 1
            cnt[i][k] += l





# 縦
for i in range(W):
    done = [0] * H
    for j in range(H):
        if done[j]:
            continue
        if maze[j][i] == "#":
            continue
        l = 0
        while j + l < H:
            if maze[j+l][i] == "#":
                break
            l += 1
        for k in range(j,j+l):
            done[k] = 1
            cnt[k][i] += l

ans = 0
for i in range(H):
    for j in range(W):
        ans = max(ans, cnt[i][j]-1)
print(ans)