H,W = map(int,input().split())
grid = [0] * H
for i in range(H):
    grid[i] = input()
right = [[0]*W for _ in range(H)]
left = [[0]*W for _ in range(H)]
up = [[0]*W for _ in range(H)]
down = [[0]*W for _ in range(H)]
for i in range(H):
    now = 0
    for x in range(W):
        if grid[i][x] == '.':
            left[i][x] = now
            now += 1
        else:
            now = 0
    now = 0
    for x in range(W-1,-1,-1):
        if grid[i][x] == '.':
            right[i][x] = now
            now += 1
        else:
            now = 0
for x in range(W):
    now = 0
    for y in range(H):
        if grid[y][x] == '.':
            up[y][x] = now
            now += 1
        else:
            now = 0
    now = 0
    for y in range(H-1,-1,-1):
        if grid[y][x] == '.':
            down[y][x] = now
            now += 1
        else:
            now = 0
ans = 0
for y in range(H):
    for x in range(W):
        if grid[y][x] == '.':
            can = 1 + right[y][x] + left[y][x] + up[y][x] + down[y][x]
            ans = max(ans,can)
print(ans) H,W = map(int,input().split()) H map(int,input().split()) map int input().split() ().split () input split W grid = [0] * H grid [0] * H [0] 0 H for i in range(H):
    grid[i] = input() i range(H) range H grid[i] = input() grid[i] grid i input() input [0]*W for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) [0]*W [0] 0 W right = [[0]*W for _ in range(H)] right [[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 left = [[0]*W for _ in range(H)] left [[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 up = [[0]*W for _ in range(H)] up [[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 down = [[0]*W for _ in range(H)] down [[0]*W for _ in range(H)] for i in range(H):
    now = 0
    for x in range(W):
        if grid[i][x] == '.':
            left[i][x] = now
            now += 1
        else:
            now = 0
    now = 0
    for x in range(W-1,-1,-1):
        if grid[i][x] == '.':
            right[i][x] = now
            now += 1
        else:
            now = 0 i range(H) range H now = 0 now 0 for x in range(W):
        if grid[i][x] == '.':
            left[i][x] = now
            now += 1
        else:
            now = 0
     x range(W) range W if grid[i][x] == '.':
            left[i][x] = now
            now += 1
        else:
            now = 0
     grid[i][x] == '.' grid[i][x] [i] grid i x '.' left[i][x] = now left[i][x] [i] left i x now now += 1 now 1 now = 0 now 0 now = 0 now 0 for x in range(W-1,-1,-1):
        if grid[i][x] == '.':
            right[i][x] = now
            now += 1
        else:
            now = 0 x range(W-1,-1,-1) range W-1 W 1 -1 -1 if grid[i][x] == '.':
            right[i][x] = now
            now += 1
        else:
            now = 0 grid[i][x] == '.' grid[i][x] [i] grid i x '.' right[i][x] = now right[i][x] [i] right i x now now += 1 now 1 now = 0 now 0 for x in range(W):
    now = 0
    for y in range(H):
        if grid[y][x] == '.':
            up[y][x] = now
            now += 1
        else:
            now = 0
    now = 0
    for y in range(H-1,-1,-1):
        if grid[y][x] == '.':
            down[y][x] = now
            now += 1
        else:
            now = 0 x range(W) range W now = 0 now 0 for y in range(H):
        if grid[y][x] == '.':
            up[y][x] = now
            now += 1
        else:
            now = 0
     y range(H) range H if grid[y][x] == '.':
            up[y][x] = now
            now += 1
        else:
            now = 0
     grid[y][x] == '.' grid[y][x] [y] grid y x '.' up[y][x] = now up[y][x] [y] up y x now now += 1 now 1 now = 0 now 0 now = 0 now 0 for y in range(H-1,-1,-1):
        if grid[y][x] == '.':
            down[y][x] = now
            now += 1
        else:
            now = 0 y range(H-1,-1,-1) range H-1 H 1 -1 -1 if grid[y][x] == '.':
            down[y][x] = now
            now += 1
        else:
            now = 0 grid[y][x] == '.' grid[y][x] [y] grid y x '.' down[y][x] = now down[y][x] [y] down y x now now += 1 now 1 now = 0 now 0 ans = 0 ans 0 for y in range(H):
    for x in range(W):
        if grid[y][x] == '.':
            can = 1 + right[y][x] + left[y][x] + up[y][x] + down[y][x]
            ans = max(ans,can) y range(H) range H for x in range(W):
        if grid[y][x] == '.':
            can = 1 + right[y][x] + left[y][x] + up[y][x] + down[y][x]
            ans = max(ans,can) x range(W) range W if grid[y][x] == '.':
            can = 1 + right[y][x] + left[y][x] + up[y][x] + down[y][x]
            ans = max(ans,can) grid[y][x] == '.' grid[y][x] [y] grid y x '.' can = 1 + right[y][x] + left[y][x] + up[y][x] + down[y][x] can 1 + right[y][x] + left[y][x] + up[y][x] + down[y][x] 1 + right[y][x] + left[y][x] + up[y][x] 1 + right[y][x] + left[y][x] 1 + right[y][x] 1 right[y][x] [y] right y x left[y][x] [y] left y x up[y][x] [y] up y x down[y][x] [y] down y x ans = max(ans,can) ans max(ans,can) max ans can print(ans) print ans left = [[0]*W for _ in range(H)] [[0]*W for _ in range(H)] left now = 0 0 now ans = max(ans,can) max(ans,can) ans grid = [0] * H [0] * H grid now += 1 1 now H,W = map(int,input().split()) map(int,input().split()) H now += 1 1 now now = 0 0 now now = 0 0 now now = 0 0 now down = [[0]*W for _ in range(H)] [[0]*W for _ in range(H)] down now += 1 1 now up = [[0]*W for _ in range(H)] [[0]*W for _ in range(H)] up now = 0 0 now right = [[0]*W for _ in range(H)] [[0]*W for _ in range(H)] right W = map(int,input().split()) map(int,input().split()) W now = 0 0 now now += 1 1 now now = 0 0 now now = 0 0 now ans = 0 0 ans can = 1 + right[y][x] + left[y][x] + up[y][x] + down[y][x] 1 + right[y][x] + left[y][x] + up[y][x] + down[y][x] can
H,W = map(int,input().split())
grid = [0] * H
for i in range(H):
    grid[i] = input()
right = [[0]*W for _ in range(H)]
left = [[0]*W for _ in range(H)]
up = [[0]*W for _ in range(H)]
down = [[0]*W for _ in range(H)]
for i in range(H):
    now = 0
    for x in range(W):
        if grid[i][x] == '.':
            left[i][x] = now
            now += 1
        else:
            now = 0
    now = 0
    for x in range(W-1,-1,-1):
        if grid[i][x] == '.':
            right[i][x] = now
            now += 1
        else:
            now = 0
for x in range(W):
    now = 0
    for y in range(H):
        if grid[y][x] == '.':
            up[y][x] = now
            now += 1
        else:
            now = 0
    now = 0
    for y in range(H-1,-1,-1):
        if grid[y][x] == '.':
            down[y][x] = now
            now += 1
        else:
            now = 0
ans = 0
for y in range(H):
    for x in range(W):
        if grid[y][x] == '.':
            can = 1 + right[y][x] + left[y][x] + up[y][x] + down[y][x]
            ans = max(ans,can)
print(ans)
