h, w = map(int, input().split())

grid = [list(input()) for _ in range(h)]
left = [[0] * w for _ in range(h)]
right = [[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):
    current = 0
    for j in range(w):
        if grid[i][j] == '#':
            current = 0
        else:
            current += 1
        left[i][j] = current
    
for i in range(h):
    current = 0
    for j in range(w - 1, -1, -1):
        if grid[i][j] == '#':
            current = 0
        else:
            current += 1
        right[i][j] = current

for i in range(w):
    current = 0
    for j in range(h):
        if grid[j][i] == '#':
            current = 0
        else:
            current += 1
        up[j][i] = current

for i in range(w):
    current = 0
    for j in range(h - 1, -1, -1):
        if grid[j][i] == '#':
            current = 0
        else:
            current += 1
        down[j][i] = current

ans = 0
for i in range(h):
    for j in range(w):
        if grid[i][j] == '#':
            continue
        ans = max(ans, left[i][j] + right[i][j] + up[i][j] + down[i][j] - 3)

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 grid = [list(input()) for _ in range(h)] grid [list(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 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 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 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):
    current = 0
    for j in range(w):
        if grid[i][j] == '#':
            current = 0
        else:
            current += 1
        left[i][j] = current
     i range(h) range h current = 0 current 0 for j in range(w):
        if grid[i][j] == '#':
            current = 0
        else:
            current += 1
        left[i][j] = current
     j range(w) range w if grid[i][j] == '#':
            current = 0
        else:
            current += 1
         grid[i][j] == '#' grid[i][j] [i] grid i j '#' current = 0 current 0 current += 1 current 1 left[i][j] = current left[i][j] [i] left i j current for i in range(h):
    current = 0
    for j in range(w - 1, -1, -1):
        if grid[i][j] == '#':
            current = 0
        else:
            current += 1
        right[i][j] = current i range(h) range h current = 0 current 0 for j in range(w - 1, -1, -1):
        if grid[i][j] == '#':
            current = 0
        else:
            current += 1
        right[i][j] = current j range(w - 1, -1, -1) range w - 1 w 1 -1 -1 if grid[i][j] == '#':
            current = 0
        else:
            current += 1
         grid[i][j] == '#' grid[i][j] [i] grid i j '#' current = 0 current 0 current += 1 current 1 right[i][j] = current right[i][j] [i] right i j current for i in range(w):
    current = 0
    for j in range(h):
        if grid[j][i] == '#':
            current = 0
        else:
            current += 1
        up[j][i] = current i range(w) range w current = 0 current 0 for j in range(h):
        if grid[j][i] == '#':
            current = 0
        else:
            current += 1
        up[j][i] = current j range(h) range h if grid[j][i] == '#':
            current = 0
        else:
            current += 1
         grid[j][i] == '#' grid[j][i] [j] grid j i '#' current = 0 current 0 current += 1 current 1 up[j][i] = current up[j][i] [j] up j i current for i in range(w):
    current = 0
    for j in range(h - 1, -1, -1):
        if grid[j][i] == '#':
            current = 0
        else:
            current += 1
        down[j][i] = current i range(w) range w current = 0 current 0 for j in range(h - 1, -1, -1):
        if grid[j][i] == '#':
            current = 0
        else:
            current += 1
        down[j][i] = current j range(h - 1, -1, -1) range h - 1 h 1 -1 -1 if grid[j][i] == '#':
            current = 0
        else:
            current += 1
         grid[j][i] == '#' grid[j][i] [j] grid j i '#' current = 0 current 0 current += 1 current 1 down[j][i] = current down[j][i] [j] down j i current ans = 0 ans 0 for i in range(h):
    for j in range(w):
        if grid[i][j] == '#':
            continue
        ans = max(ans, left[i][j] + right[i][j] + up[i][j] + down[i][j] - 3) i range(h) range h for j in range(w):
        if grid[i][j] == '#':
            continue
        ans = max(ans, left[i][j] + right[i][j] + up[i][j] + down[i][j] - 3) j range(w) range w if grid[i][j] == '#':
            continue
         grid[i][j] == '#' grid[i][j] [i] grid i j '#' continue ans = max(ans, left[i][j] + right[i][j] + up[i][j] + down[i][j] - 3) ans max(ans, left[i][j] + right[i][j] + up[i][j] + down[i][j] - 3) max ans left[i][j] + right[i][j] + up[i][j] + down[i][j] - 3 left[i][j] + right[i][j] + up[i][j] + down[i][j] left[i][j] + right[i][j] + up[i][j] left[i][j] + right[i][j] left[i][j] [i] left i j right[i][j] [i] right i j up[i][j] [i] up i j down[i][j] [i] down i j 3 print(ans) print ans current = 0 0 current left = [[0] * w for _ in range(h)] [[0] * w for _ in range(h)] left ans = 0 0 ans current = 0 0 current w = map(int, input().split()) map(int, input().split()) w right = [[0] * w for _ in range(h)] [[0] * w for _ in range(h)] right current = 0 0 current current += 1 1 current grid = [list(input()) for _ in range(h)] [list(input()) for _ in range(h)] grid current = 0 0 current current = 0 0 current h, w = map(int, input().split()) map(int, input().split()) h down = [[0] * w for _ in range(h)] [[0] * w for _ in range(h)] down up = [[0] * w for _ in range(h)] [[0] * w for _ in range(h)] up current = 0 0 current current += 1 1 current current = 0 0 current current += 1 1 current ans = max(ans, left[i][j] + right[i][j] + up[i][j] + down[i][j] - 3) max(ans, left[i][j] + right[i][j] + up[i][j] + down[i][j] - 3) ans current = 0 0 current current += 1 1 current
h, w = map(int, input().split())

grid = [list(input()) for _ in range(h)]
left = [[0] * w for _ in range(h)]
right = [[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):
    current = 0
    for j in range(w):
        if grid[i][j] == '#':
            current = 0
        else:
            current += 1
        left[i][j] = current
    
for i in range(h):
    current = 0
    for j in range(w - 1, -1, -1):
        if grid[i][j] == '#':
            current = 0
        else:
            current += 1
        right[i][j] = current

for i in range(w):
    current = 0
    for j in range(h):
        if grid[j][i] == '#':
            current = 0
        else:
            current += 1
        up[j][i] = current

for i in range(w):
    current = 0
    for j in range(h - 1, -1, -1):
        if grid[j][i] == '#':
            current = 0
        else:
            current += 1
        down[j][i] = current

ans = 0
for i in range(h):
    for j in range(w):
        if grid[i][j] == '#':
            continue
        ans = max(ans, left[i][j] + right[i][j] + up[i][j] + down[i][j] - 3)

print(ans)