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