### BUGGY CODE ###

import numpy as np

H, W = map(int, input().split())

S = [None] * H
ans = np.zeros((H, W))

for i in range(H):
    s_tmp = [-1] * W
    s = input()
    for j, c in enumerate(s):
        if c == "#":
            s_tmp[j] = 1
        else:
            s_tmp[j] = 0
    S[i] = s_tmp

max_tmp = 0
coord = (-1, -1)
for i in range(H):
    # 左から右
    tmp = 0
    for j in range(W):
        if S[i][j] == 1:
            tmp = 0
        else:
            tmp += 1
        ans[i, j] += tmp
    # 右から左
    tmp = 0
    for j in reversed(range(W)):
        if S[i][j] == 1:
            tmp = 0
        else:
            tmp += 1
        ans[i, j] += tmp

# 右から左
for i in range(W):
    # 上から下
    tmp = 0
    for j in range(H):
        if S[j][i] == 1:
            tmp = 0
        else:
            tmp += 1
        ans[j, i] += tmp
    # 下から上
    tmp = 0
    for j in reversed(range(H)):
        if S[j][i] == 1:
            tmp = 0
        else:
            tmp += 1
        ans[j, i] += tmp
        if ans[j, i] > max_tmp:
            max_tmp = ans[j, i]
            coord = (j, i)

score = 1

tmp_x = coord[1]
while True:
    tmp_x -= 1
    if tmp_x < 0:
        break
    if S[coord[0]][tmp_x] == 0:
        score += 1
    else:
        break
tmp_x = coord[1]
while True:
    tmp_x += 1
    if tmp_x >= W:
        break
    if S[coord[0]][tmp_x] == 0:
        score += 1
    else:
        break
tmp_y = coord[0]
while True:
    tmp_y -= 1
    if tmp_y < 0:
        break
    if S[tmp_y][coord[1]] == 0:
        score += 1
    else:
        break
tmp_y = coord[0]
while True:
    tmp_y += 1
    if tmp_y >= H:
        break
    if S[tmp_y][coord[1]] == 0:
        score += 1
    else:
        break

print(score)

### FIXED CODE ###

# import numpy as np

H, W = map(int, input().split())

S = [None] * H
# ans = np.zeros((H, W))
ans = [[0 for j in range(W)] for i in range(H)]

for i in range(H):
    s_tmp = [-1] * W
    s = input()
    for j, c in enumerate(s):
        if c == "#":
            s_tmp[j] = 1
        else:
            s_tmp[j] = 0
    S[i] = s_tmp

max_tmp = 0
coord = (-1, -1)
for i in range(H):
    # 左から右
    tmp = 0
    for j in range(W):
        if S[i][j] == 1:
            tmp = 0
        else:
            tmp += 1
        # ans[i, j] += tmp
        ans[i][j] += tmp
    # 右から左
    tmp = 0
    for j in reversed(range(W)):
        if S[i][j] == 1:
            tmp = 0
        else:
            tmp += 1
        # ans[i, j] += tmp
        ans[i][j] += tmp

# 右から左
for i in range(W):
    # 上から下
    tmp = 0
    for j in range(H):
        if S[j][i] == 1:
            tmp = 0
        else:
            tmp += 1
        # ans[j, i] += tmp
        ans[j][i] += tmp
    # 下から上
    tmp = 0
    for j in reversed(range(H)):
        if S[j][i] == 1:
            tmp = 0
        else:
            tmp += 1
        # ans[j, i] += tmp
        ans[j][i] += tmp
        # if ans[j, i] > max_tmp:
        if ans[j][i] > max_tmp:
            # max_tmp = ans[j, i]
            max_tmp = ans[j][i]
            coord = (j, i)

score = 1

tmp_x = coord[1]
while True:
    tmp_x -= 1
    if tmp_x < 0:
        break
    if S[coord[0]][tmp_x] == 0:
        score += 1
    else:
        break
tmp_x = coord[1]
while True:
    tmp_x += 1
    if tmp_x >= W:
        break
    if S[coord[0]][tmp_x] == 0:
        score += 1
    else:
        break
tmp_y = coord[0]
while True:
    tmp_y -= 1
    if tmp_y < 0:
        break
    if S[tmp_y][coord[1]] == 0:
        score += 1
    else:
        break
tmp_y = coord[0]
while True:
    tmp_y += 1
    if tmp_y >= H:
        break
    if S[tmp_y][coord[1]] == 0:
        score += 1
    else:
        break

print(score)