from itertools import chain

H,W = map(int,input().split())
grid = tuple(tuple(map(lambda c: c != '#', input())) for _ in range(H))

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

for i in range(H):
    s = 0
    for j in range(W):
        if grid[i][j]:
            scores[i][j] += s
            s += 1
        else:
            s = 0

for i in range(H):
    s = 0
    for j in reversed(range(W)):
        if grid[i][j]:
            scores[i][j] += s
            s += 1
        else:
            s = 0

for j in range(W):
    s = 0
    for i in range(H):
        if grid[i][j]:
            scores[i][j] += s
            s += 1
        else:
            s = 0

for j in range(W):
    s = 0
    for i in reversed(range(H)):
        if grid[i][j]:
            scores[i][j] += s
            s += 1
        else:
            s = 0


print(1 + max(chain.from_iterable(scores))) from itertools import chain H,W = map(int,input().split()) H map(int,input().split()) map int input().split() ().split () input split W grid = tuple(tuple(map(lambda c: c != '#', input())) for _ in range(H)) grid tuple(tuple(map(lambda c: c != '#', input())) for _ in range(H)) tuple tuple(map(lambda c: c != '#', input())) tuple map(lambda c: c != '#', input()) map lambda c: c != '#' c != '#' c '#' c 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 scores = [[0]*W for _ in range(H)] scores [[0]*W for _ in range(H)] for i in range(H):
    s = 0
    for j in range(W):
        if grid[i][j]:
            scores[i][j] += s
            s += 1
        else:
            s = 0 i range(H) range H s = 0 s 0 for j in range(W):
        if grid[i][j]:
            scores[i][j] += s
            s += 1
        else:
            s = 0 j range(W) range W if grid[i][j]:
            scores[i][j] += s
            s += 1
        else:
            s = 0 grid[i][j] [i] grid i j scores[i][j] += s scores[i][j] [i] scores i j s s += 1 s 1 s = 0 s 0 for i in range(H):
    s = 0
    for j in reversed(range(W)):
        if grid[i][j]:
            scores[i][j] += s
            s += 1
        else:
            s = 0 i range(H) range H s = 0 s 0 for j in reversed(range(W)):
        if grid[i][j]:
            scores[i][j] += s
            s += 1
        else:
            s = 0 j reversed(range(W)) reversed range(W) range W if grid[i][j]:
            scores[i][j] += s
            s += 1
        else:
            s = 0 grid[i][j] [i] grid i j scores[i][j] += s scores[i][j] [i] scores i j s s += 1 s 1 s = 0 s 0 for j in range(W):
    s = 0
    for i in range(H):
        if grid[i][j]:
            scores[i][j] += s
            s += 1
        else:
            s = 0 j range(W) range W s = 0 s 0 for i in range(H):
        if grid[i][j]:
            scores[i][j] += s
            s += 1
        else:
            s = 0 i range(H) range H if grid[i][j]:
            scores[i][j] += s
            s += 1
        else:
            s = 0 grid[i][j] [i] grid i j scores[i][j] += s scores[i][j] [i] scores i j s s += 1 s 1 s = 0 s 0 for j in range(W):
    s = 0
    for i in reversed(range(H)):
        if grid[i][j]:
            scores[i][j] += s
            s += 1
        else:
            s = 0 j range(W) range W s = 0 s 0 for i in reversed(range(H)):
        if grid[i][j]:
            scores[i][j] += s
            s += 1
        else:
            s = 0 i reversed(range(H)) reversed range(H) range H if grid[i][j]:
            scores[i][j] += s
            s += 1
        else:
            s = 0 grid[i][j] [i] grid i j scores[i][j] += s scores[i][j] [i] scores i j s s += 1 s 1 s = 0 s 0 print(1 + max(chain.from_iterable(scores))) print 1 + max(chain.from_iterable(scores)) 1 max(chain.from_iterable(scores)) max chain.from_iterable(scores) chain.from_iterable chain from_iterable scores W = map(int,input().split()) map(int,input().split()) W s = 0 0 s s += 1 1 s s = 0 0 s s += 1 1 s s += 1 1 s s += 1 1 s s = 0 0 s s = 0 0 s s = 0 0 s s = 0 0 s H,W = map(int,input().split()) map(int,input().split()) H s = 0 0 s s = 0 0 s scores = [[0]*W for _ in range(H)] [[0]*W for _ in range(H)] scores grid = tuple(tuple(map(lambda c: c != '#', input())) for _ in range(H)) tuple(tuple(map(lambda c: c != '#', input())) for _ in range(H)) grid
from itertools import chain

H,W = map(int,input().split())
grid = tuple(tuple(map(lambda c: c != '#', input())) for _ in range(H))

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

for i in range(H):
    s = 0
    for j in range(W):
        if grid[i][j]:
            scores[i][j] += s
            s += 1
        else:
            s = 0

for i in range(H):
    s = 0
    for j in reversed(range(W)):
        if grid[i][j]:
            scores[i][j] += s
            s += 1
        else:
            s = 0

for j in range(W):
    s = 0
    for i in range(H):
        if grid[i][j]:
            scores[i][j] += s
            s += 1
        else:
            s = 0

for j in range(W):
    s = 0
    for i in reversed(range(H)):
        if grid[i][j]:
            scores[i][j] += s
            s += 1
        else:
            s = 0


print(1 + max(chain.from_iterable(scores)))
