import sys

H, W = map(int, sys.stdin.readline().strip().split())
grid = []
for _ in range(H):
    grid.append(sys.stdin.readline().strip())

# (x, y)のx, y方向のscore [a, b]
scores_y = [[0 for _ in range(W)] for _ in range(H)]
scores_x = [[0 for _ in range(W)] for _ in range(H)]
for y in range(H):
    start = 0
    count = 0
    for x in range(W):
        if grid[y][x] == "#" or x == W-1:
            if x == W-1 and grid[y][x] != "#":
                count += 1
            for i in range(start, x+1):
                scores_x[y][i] = count
            count = 0
            start = x + 1
        else:
            count += 1

for x in range(W):
    start = 0
    count = 0
    for y in range(H):
        if grid[y][x] == "#" or y == H-1:
            if y == H-1 and grid[y][x] != "#":
                count += 1
            for i in range(start, y+1):
                scores_y[i][x] = count
            count = 0
            start = y + 1
        else:
            count += 1

# print(scores)
ans = 0
for y in range(H):
    for x in range(W):
        ans = max(ans, scores_x[y][x] + scores_y[y][x] - 1)
print(ans) import sys sys H, W = map(int, sys.stdin.readline().strip().split()) H map(int, sys.stdin.readline().strip().split()) map int sys.stdin.readline().strip().split() sys.stdin.readline().strip().split sys.stdin.readline().strip() sys.stdin.readline().strip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline strip split W grid = [] grid [] for _ in range(H):
    grid.append(sys.stdin.readline().strip())

# (x, y)のx, y方向のscore [a, b] _ range(H) range H grid.append(sys.stdin.readline().strip()) grid.append grid append sys.stdin.readline().strip() sys.stdin.readline().strip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline strip [0 for _ in range(W)] for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) [0 for _ in range(W)] scores_y = [[0 for _ in range(W)] for _ in range(H)] scores_y [[0 for _ in range(W)] for _ in range(H)] [0 for _ in range(W)] for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) [0 for _ in range(W)] scores_x = [[0 for _ in range(W)] for _ in range(H)] scores_x [[0 for _ in range(W)] for _ in range(H)] for y in range(H):
    start = 0
    count = 0
    for x in range(W):
        if grid[y][x] == "#" or x == W-1:
            if x == W-1 and grid[y][x] != "#":
                count += 1
            for i in range(start, x+1):
                scores_x[y][i] = count
            count = 0
            start = x + 1
        else:
            count += 1 y range(H) range H start = 0 start 0 count = 0 count 0 for x in range(W):
        if grid[y][x] == "#" or x == W-1:
            if x == W-1 and grid[y][x] != "#":
                count += 1
            for i in range(start, x+1):
                scores_x[y][i] = count
            count = 0
            start = x + 1
        else:
            count += 1 x range(W) range W if grid[y][x] == "#" or x == W-1:
            if x == W-1 and grid[y][x] != "#":
                count += 1
            for i in range(start, x+1):
                scores_x[y][i] = count
            count = 0
            start = x + 1
        else:
            count += 1 grid[y][x] == "#" or x == W-1 grid[y][x] == "#" grid[y][x] [y] grid y x "#" x == W-1 x W-1 W 1 if x == W-1 and grid[y][x] != "#":
                count += 1
             x == W-1 and grid[y][x] != "#" x == W-1 x W-1 W 1 grid[y][x] != "#" grid[y][x] [y] grid y x "#" count += 1 count 1 for i in range(start, x+1):
                scores_x[y][i] = count
             i range(start, x+1) range start x+1 x 1 scores_x[y][i] = count scores_x[y][i] [y] scores_x y i count count = 0 count 0 start = x + 1 start x + 1 x 1 count += 1 count 1 for x in range(W):
    start = 0
    count = 0
    for y in range(H):
        if grid[y][x] == "#" or y == H-1:
            if y == H-1 and grid[y][x] != "#":
                count += 1
            for i in range(start, y+1):
                scores_y[i][x] = count
            count = 0
            start = y + 1
        else:
            count += 1

# print(scores) x range(W) range W start = 0 start 0 count = 0 count 0 for y in range(H):
        if grid[y][x] == "#" or y == H-1:
            if y == H-1 and grid[y][x] != "#":
                count += 1
            for i in range(start, y+1):
                scores_y[i][x] = count
            count = 0
            start = y + 1
        else:
            count += 1

# print(scores) y range(H) range H if grid[y][x] == "#" or y == H-1:
            if y == H-1 and grid[y][x] != "#":
                count += 1
            for i in range(start, y+1):
                scores_y[i][x] = count
            count = 0
            start = y + 1
        else:
            count += 1

# print(scores) grid[y][x] == "#" or y == H-1 grid[y][x] == "#" grid[y][x] [y] grid y x "#" y == H-1 y H-1 H 1 if y == H-1 and grid[y][x] != "#":
                count += 1
             y == H-1 and grid[y][x] != "#" y == H-1 y H-1 H 1 grid[y][x] != "#" grid[y][x] [y] grid y x "#" count += 1 count 1 for i in range(start, y+1):
                scores_y[i][x] = count
             i range(start, y+1) range start y+1 y 1 scores_y[i][x] = count scores_y[i][x] [i] scores_y i x count count = 0 count 0 start = y + 1 start y + 1 y 1 count += 1 count 1 ans = 0 ans 0 for y in range(H):
    for x in range(W):
        ans = max(ans, scores_x[y][x] + scores_y[y][x] - 1) y range(H) range H for x in range(W):
        ans = max(ans, scores_x[y][x] + scores_y[y][x] - 1) x range(W) range W ans = max(ans, scores_x[y][x] + scores_y[y][x] - 1) ans max(ans, scores_x[y][x] + scores_y[y][x] - 1) max ans scores_x[y][x] + scores_y[y][x] - 1 scores_x[y][x] + scores_y[y][x] scores_x[y][x] [y] scores_x y x scores_y[y][x] [y] scores_y y x 1 print(ans) print ans start = 0 0 start count += 1 1 count count = 0 0 count count += 1 1 count count = 0 0 count ans = 0 0 ans scores_x = [[0 for _ in range(W)] for _ in range(H)] [[0 for _ in range(W)] for _ in range(H)] scores_x W = map(int, sys.stdin.readline().strip().split()) map(int, sys.stdin.readline().strip().split()) W start = x + 1 x + 1 start start = 0 0 start count = 0 0 count scores_y = [[0 for _ in range(W)] for _ in range(H)] [[0 for _ in range(W)] for _ in range(H)] scores_y count = 0 0 count count += 1 1 count H, W = map(int, sys.stdin.readline().strip().split()) map(int, sys.stdin.readline().strip().split()) H grid = [] [] grid start = y + 1 y + 1 start ans = max(ans, scores_x[y][x] + scores_y[y][x] - 1) max(ans, scores_x[y][x] + scores_y[y][x] - 1) ans count += 1 1 count
import sys

H, W = map(int, sys.stdin.readline().strip().split())
grid = []
for _ in range(H):
    grid.append(sys.stdin.readline().strip())

# (x, y)のx, y方向のscore [a, b]
scores_y = [[0 for _ in range(W)] for _ in range(H)]
scores_x = [[0 for _ in range(W)] for _ in range(H)]
for y in range(H):
    start = 0
    count = 0
    for x in range(W):
        if grid[y][x] == "#" or x == W-1:
            if x == W-1 and grid[y][x] != "#":
                count += 1
            for i in range(start, x+1):
                scores_x[y][i] = count
            count = 0
            start = x + 1
        else:
            count += 1

for x in range(W):
    start = 0
    count = 0
    for y in range(H):
        if grid[y][x] == "#" or y == H-1:
            if y == H-1 and grid[y][x] != "#":
                count += 1
            for i in range(start, y+1):
                scores_y[i][x] = count
            count = 0
            start = y + 1
        else:
            count += 1

# print(scores)
ans = 0
for y in range(H):
    for x in range(W):
        ans = max(ans, scores_x[y][x] + scores_y[y][x] - 1)
print(ans)