# D - Lamp
import numpy as np

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

# 0: 障害物または壁 1: 通路
# 上下左右の壁の分を加味して+2したグリッドを用意する。
g = np.zeros((h+2,w+2),dtype=np.int64)
for i in range(h):
    grid = np.array(list(input()))
    g[i+1, 1:w+1] = (grid=='.')

# 横について考える
gW = np.copy(g)
gW = np.ravel(gW)
tWLeft = np.arange((w+2)*(h+2))
tWRight = np.copy(tWLeft)

tWLeft[gW==1] = 0
tWRight[gW[::-1]==1] = 0

np.maximum.accumulate(tWLeft, out=tWLeft)
np.maximum.accumulate(tWRight, out=tWRight)

tWRight = len(tWRight) - 1 - tWRight[::-1]

tW = tWRight-tWLeft-1
tW[gW==0] = 0
tW = tW.reshape(h+2, w+2)

# 縦について考える
gH = np.copy(g.T)
gH = np.ravel(gH)
tHLeft = np.arange((w+2)*(h+2))
tHRight = np.copy(tHLeft)

tHLeft[gH==1] = 0
tHRight[gH[::-1]==1] = 0

np.maximum.accumulate(tHLeft, out=tHLeft)
np.maximum.accumulate(tHRight, out=tHRight)

tHRight = len(tHRight) - 1 - tHRight[::-1]

tH = tHRight-tHLeft-1
tH[gH==0] = 0
tH = tH.reshape(w+2, h+2).T

#print(tW)
#print(tH)
print(np.max(tW+tH-1))


'''
# 横について考える
tblW = np.zeros((h, w),dtype=np.int64)
for i in range(h):
    for j in range(w):
        if grid[i, j]=='#' or tblW[i, j]>0:
            continue
        else:
            cnt = 1
            while j+cnt<w and grid[i, j+cnt]!='#':
                cnt += 1
            tblW[i, j:j+cnt] = cnt
print(tblW)
    
# 縦について考える
tblH = np.zeros((h, w),dtype=np.int64)
for j in range(w):
    for i in range(h):
        if grid[i, j]=='#' or tblH[i, j]>0:
            continue
        else:
            cnt = 1
            while i+cnt<h and grid[i+cnt, j]!='#':
                cnt += 1
            tblH[i:i+cnt, j] = cnt
print(tblH)

ans = 0
for i in range(h):
    for j in range(w):
        ans = max(ans, tblH[i, j]+tblW[i, j]-1)

print(ans)
''' import numpy as np numpy h, w = map(int, input().split()) h map(int, input().split()) map int input().split() ().split () input split w g = np.zeros((h+2,w+2),dtype=np.int64) g np.zeros((h+2,w+2),dtype=np.int64) np.zeros np zeros (h+2,w+2) h+2 h 2 w+2 w 2 dtype=np.int64 dtype np.int64 np int64 for i in range(h):
    grid = np.array(list(input()))
    g[i+1, 1:w+1] = (grid=='.')

# 横について考える i range(h) range h grid = np.array(list(input())) grid np.array(list(input())) np.array np array list(input()) list input() input g[i+1, 1:w+1] = (grid=='.') g[i+1, 1:w+1] g i+1 i 1 grid=='.' grid '.' gW = np.copy(g) gW np.copy(g) np.copy np copy g gW = np.ravel(gW) gW np.ravel(gW) np.ravel np ravel gW tWLeft = np.arange((w+2)*(h+2)) tWLeft np.arange((w+2)*(h+2)) np.arange np arange (w+2)*(h+2) w+2 w 2 h+2 h 2 tWRight = np.copy(tWLeft) tWRight np.copy(tWLeft) np.copy np copy tWLeft tWLeft[gW==1] = 0 tWLeft[gW==1] tWLeft gW==1 gW 1 0 tWRight[gW[::-1]==1] = 0 tWRight[gW[::-1]==1] tWRight gW[::-1]==1 gW[::-1] gW ::-1 -1 1 0 np.maximum.accumulate(tWLeft, out=tWLeft) np.maximum.accumulate np.maximum np maximum accumulate tWLeft out=tWLeft out tWLeft np.maximum.accumulate(tWRight, out=tWRight) np.maximum.accumulate np.maximum np maximum accumulate tWRight out=tWRight out tWRight tWRight = len(tWRight) - 1 - tWRight[::-1] tWRight len(tWRight) - 1 - tWRight[::-1] len(tWRight) - 1 len(tWRight) len tWRight 1 tWRight[::-1] tWRight ::-1 -1 tW = tWRight-tWLeft-1 tW tWRight-tWLeft-1 tWRight-tWLeft tWRight tWLeft 1 tW[gW==0] = 0 tW[gW==0] tW gW==0 gW 0 0 tW = tW.reshape(h+2, w+2) tW tW.reshape(h+2, w+2) tW.reshape tW reshape h+2 h 2 w+2 w 2 gH = np.copy(g.T) gH np.copy(g.T) np.copy np copy g.T g T gH = np.ravel(gH) gH np.ravel(gH) np.ravel np ravel gH tHLeft = np.arange((w+2)*(h+2)) tHLeft np.arange((w+2)*(h+2)) np.arange np arange (w+2)*(h+2) w+2 w 2 h+2 h 2 tHRight = np.copy(tHLeft) tHRight np.copy(tHLeft) np.copy np copy tHLeft tHLeft[gH==1] = 0 tHLeft[gH==1] tHLeft gH==1 gH 1 0 tHRight[gH[::-1]==1] = 0 tHRight[gH[::-1]==1] tHRight gH[::-1]==1 gH[::-1] gH ::-1 -1 1 0 np.maximum.accumulate(tHLeft, out=tHLeft) np.maximum.accumulate np.maximum np maximum accumulate tHLeft out=tHLeft out tHLeft np.maximum.accumulate(tHRight, out=tHRight) np.maximum.accumulate np.maximum np maximum accumulate tHRight out=tHRight out tHRight tHRight = len(tHRight) - 1 - tHRight[::-1] tHRight len(tHRight) - 1 - tHRight[::-1] len(tHRight) - 1 len(tHRight) len tHRight 1 tHRight[::-1] tHRight ::-1 -1 tH = tHRight-tHLeft-1 tH tHRight-tHLeft-1 tHRight-tHLeft tHRight tHLeft 1 tH[gH==0] = 0 tH[gH==0] tH gH==0 gH 0 0 tH = tH.reshape(w+2, h+2).T tH tH.reshape(w+2, h+2).T tH.reshape(w+2, h+2) tH.reshape tH reshape w+2 w 2 h+2 h 2 T print(np.max(tW+tH-1)) print np.max(tW+tH-1) np.max np max tW+tH-1 tW+tH tW tH 1 '''
# 横について考える
tblW = np.zeros((h, w),dtype=np.int64)
for i in range(h):
    for j in range(w):
        if grid[i, j]=='#' or tblW[i, j]>0:
            continue
        else:
            cnt = 1
            while j+cnt<w and grid[i, j+cnt]!='#':
                cnt += 1
            tblW[i, j:j+cnt] = cnt
print(tblW)
    
# 縦について考える
tblH = np.zeros((h, w),dtype=np.int64)
for j in range(w):
    for i in range(h):
        if grid[i, j]=='#' or tblH[i, j]>0:
            continue
        else:
            cnt = 1
            while i+cnt<h and grid[i+cnt, j]!='#':
                cnt += 1
            tblH[i:i+cnt, j] = cnt
print(tblH)

ans = 0
for i in range(h):
    for j in range(w):
        ans = max(ans, tblH[i, j]+tblW[i, j]-1)

print(ans)
''' gW = np.copy(g) np.copy(g) gW gH = np.ravel(gH) np.ravel(gH) gH tW = tWRight-tWLeft-1 tWRight-tWLeft-1 tW tH = tHRight-tHLeft-1 tHRight-tHLeft-1 tH tH = tH.reshape(w+2, h+2).T tH.reshape(w+2, h+2).T tH h, w = map(int, input().split()) map(int, input().split()) h gH = np.copy(g.T) np.copy(g.T) gH tHLeft = np.arange((w+2)*(h+2)) np.arange((w+2)*(h+2)) tHLeft tWLeft = np.arange((w+2)*(h+2)) np.arange((w+2)*(h+2)) tWLeft gW = np.ravel(gW) np.ravel(gW) gW tHRight = len(tHRight) - 1 - tHRight[::-1] len(tHRight) - 1 - tHRight[::-1] tHRight grid = np.array(list(input())) np.array(list(input())) grid w = map(int, input().split()) map(int, input().split()) w tW = tW.reshape(h+2, w+2) tW.reshape(h+2, w+2) tW tWRight = np.copy(tWLeft) np.copy(tWLeft) tWRight g = np.zeros((h+2,w+2),dtype=np.int64) np.zeros((h+2,w+2),dtype=np.int64) g tWRight = len(tWRight) - 1 - tWRight[::-1] len(tWRight) - 1 - tWRight[::-1] tWRight tHRight = np.copy(tHLeft) np.copy(tHLeft) tHRight
# D - Lamp
import numpy as np

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

# 0: 障害物または壁 1: 通路
# 上下左右の壁の分を加味して+2したグリッドを用意する。
g = np.zeros((h+2,w+2),dtype=np.int64)
for i in range(h):
    grid = np.array(list(input()))
    g[i+1, 1:w+1] = (grid=='.')

# 横について考える
gW = np.copy(g)
gW = np.ravel(gW)
tWLeft = np.arange((w+2)*(h+2))
tWRight = np.copy(tWLeft)

tWLeft[gW==1] = 0
tWRight[gW[::-1]==1] = 0

np.maximum.accumulate(tWLeft, out=tWLeft)
np.maximum.accumulate(tWRight, out=tWRight)

tWRight = len(tWRight) - 1 - tWRight[::-1]

tW = tWRight-tWLeft-1
tW[gW==0] = 0
tW = tW.reshape(h+2, w+2)

# 縦について考える
gH = np.copy(g.T)
gH = np.ravel(gH)
tHLeft = np.arange((w+2)*(h+2))
tHRight = np.copy(tHLeft)

tHLeft[gH==1] = 0
tHRight[gH[::-1]==1] = 0

np.maximum.accumulate(tHLeft, out=tHLeft)
np.maximum.accumulate(tHRight, out=tHRight)

tHRight = len(tHRight) - 1 - tHRight[::-1]

tH = tHRight-tHLeft-1
tH[gH==0] = 0
tH = tH.reshape(w+2, h+2).T

#print(tW)
#print(tH)
print(np.max(tW+tH-1))


'''
# 横について考える
tblW = np.zeros((h, w),dtype=np.int64)
for i in range(h):
    for j in range(w):
        if grid[i, j]=='#' or tblW[i, j]>0:
            continue
        else:
            cnt = 1
            while j+cnt<w and grid[i, j+cnt]!='#':
                cnt += 1
            tblW[i, j:j+cnt] = cnt
print(tblW)
    
# 縦について考える
tblH = np.zeros((h, w),dtype=np.int64)
for j in range(w):
    for i in range(h):
        if grid[i, j]=='#' or tblH[i, j]>0:
            continue
        else:
            cnt = 1
            while i+cnt<h and grid[i+cnt, j]!='#':
                cnt += 1
            tblH[i:i+cnt, j] = cnt
print(tblH)

ans = 0
for i in range(h):
    for j in range(w):
        ans = max(ans, tblH[i, j]+tblW[i, j]-1)

print(ans)
'''