h,w=map(int,input().split())
M=[list(input()) for i in range(h)]
D=[[0]*w for i in range(h)]
U=[[0]*w for i in range(h)]
R=[[0]*w for i in range(h)]
L=[[0]*w for i in range(h)]

for i in range(h):
    c=0
    for j in range(w):
        if M[i][j]=='.':
            c+=1
            R[i][j]=c
        else:
            c=0
for i in range(h):
    c=0
    for j in range(w):
        if M[i][w-1-j]=='.':
            c+=1
            L[i][w-1-j]=c
        else:
            c=0
for j in range(w):
    c=0
    for i in range(h):
        if M[i][j]=='.':
            c+=1
            D[i][j]=c
        else:
            c=0
for j in range(w):
    c=0
    for i in range(h):
        if M[h-1-i][j]=='.':
            c+=1
            U[h-1-i][j]=c
        else:
            c=0
r=0
for i in range(h):
    for j in range(w):
        r=max(r,R[i][j]+L[i][j]+D[i][j]+U[i][j]-3)
print(r) h,w=map(int,input().split()) h map(int,input().split()) map int input().split() ().split () input split w list(input()) for i in range(h) for i in range(h) i range(h) range h for i in range(h) list(input()) list input() input M=[list(input()) for i in range(h)] M [list(input()) for i in range(h)] [0]*w for i in range(h) for i in range(h) i range(h) range h for i in range(h) [0]*w [0] 0 w D=[[0]*w for i in range(h)] D [[0]*w for i in range(h)] [0]*w for i in range(h) for i in range(h) i range(h) range h for i in range(h) [0]*w [0] 0 w U=[[0]*w for i in range(h)] U [[0]*w for i in range(h)] [0]*w for i in range(h) for i in range(h) i range(h) range h for i in range(h) [0]*w [0] 0 w R=[[0]*w for i in range(h)] R [[0]*w for i in range(h)] [0]*w for i in range(h) for i in range(h) i range(h) range h for i in range(h) [0]*w [0] 0 w L=[[0]*w for i in range(h)] L [[0]*w for i in range(h)] for i in range(h):
    c=0
    for j in range(w):
        if M[i][j]=='.':
            c+=1
            R[i][j]=c
        else:
            c=0 i range(h) range h c=0 c 0 for j in range(w):
        if M[i][j]=='.':
            c+=1
            R[i][j]=c
        else:
            c=0 j range(w) range w if M[i][j]=='.':
            c+=1
            R[i][j]=c
        else:
            c=0 M[i][j]=='.' M[i][j] [i] M i j '.' c+=1 c 1 R[i][j]=c R[i][j] [i] R i j c c=0 c 0 for i in range(h):
    c=0
    for j in range(w):
        if M[i][w-1-j]=='.':
            c+=1
            L[i][w-1-j]=c
        else:
            c=0 i range(h) range h c=0 c 0 for j in range(w):
        if M[i][w-1-j]=='.':
            c+=1
            L[i][w-1-j]=c
        else:
            c=0 j range(w) range w if M[i][w-1-j]=='.':
            c+=1
            L[i][w-1-j]=c
        else:
            c=0 M[i][w-1-j]=='.' M[i][w-1-j] [i] M i w-1-j w-1 w 1 j '.' c+=1 c 1 L[i][w-1-j]=c L[i][w-1-j] [i] L i w-1-j w-1 w 1 j c c=0 c 0 for j in range(w):
    c=0
    for i in range(h):
        if M[i][j]=='.':
            c+=1
            D[i][j]=c
        else:
            c=0 j range(w) range w c=0 c 0 for i in range(h):
        if M[i][j]=='.':
            c+=1
            D[i][j]=c
        else:
            c=0 i range(h) range h if M[i][j]=='.':
            c+=1
            D[i][j]=c
        else:
            c=0 M[i][j]=='.' M[i][j] [i] M i j '.' c+=1 c 1 D[i][j]=c D[i][j] [i] D i j c c=0 c 0 for j in range(w):
    c=0
    for i in range(h):
        if M[h-1-i][j]=='.':
            c+=1
            U[h-1-i][j]=c
        else:
            c=0 j range(w) range w c=0 c 0 for i in range(h):
        if M[h-1-i][j]=='.':
            c+=1
            U[h-1-i][j]=c
        else:
            c=0 i range(h) range h if M[h-1-i][j]=='.':
            c+=1
            U[h-1-i][j]=c
        else:
            c=0 M[h-1-i][j]=='.' M[h-1-i][j] [h-1-i] M h-1-i h-1 h 1 i j '.' c+=1 c 1 U[h-1-i][j]=c U[h-1-i][j] [h-1-i] U h-1-i h-1 h 1 i j c c=0 c 0 r=0 r 0 for i in range(h):
    for j in range(w):
        r=max(r,R[i][j]+L[i][j]+D[i][j]+U[i][j]-3) i range(h) range h for j in range(w):
        r=max(r,R[i][j]+L[i][j]+D[i][j]+U[i][j]-3) j range(w) range w r=max(r,R[i][j]+L[i][j]+D[i][j]+U[i][j]-3) r max(r,R[i][j]+L[i][j]+D[i][j]+U[i][j]-3) max r R[i][j]+L[i][j]+D[i][j]+U[i][j]-3 R[i][j]+L[i][j]+D[i][j]+U[i][j] R[i][j]+L[i][j]+D[i][j] R[i][j]+L[i][j] R[i][j] [i] R i j L[i][j] [i] L i j D[i][j] [i] D i j U[i][j] [i] U i j 3 print(r) print r M=[list(input()) for i in range(h)] [list(input()) for i in range(h)] M D=[[0]*w for i in range(h)] [[0]*w for i in range(h)] D c+=1 1 c R=[[0]*w for i in range(h)] [[0]*w for i in range(h)] R c=0 0 c c=0 0 c U=[[0]*w for i in range(h)] [[0]*w for i in range(h)] U c=0 0 c c=0 0 c c+=1 1 c r=max(r,R[i][j]+L[i][j]+D[i][j]+U[i][j]-3) max(r,R[i][j]+L[i][j]+D[i][j]+U[i][j]-3) r c=0 0 c r=0 0 r L=[[0]*w for i in range(h)] [[0]*w for i in range(h)] L c=0 0 c c=0 0 c w=map(int,input().split()) map(int,input().split()) w c=0 0 c h,w=map(int,input().split()) map(int,input().split()) h c+=1 1 c c+=1 1 c
h,w=map(int,input().split())
M=[list(input()) for i in range(h)]
D=[[0]*w for i in range(h)]
U=[[0]*w for i in range(h)]
R=[[0]*w for i in range(h)]
L=[[0]*w for i in range(h)]

for i in range(h):
    c=0
    for j in range(w):
        if M[i][j]=='.':
            c+=1
            R[i][j]=c
        else:
            c=0
for i in range(h):
    c=0
    for j in range(w):
        if M[i][w-1-j]=='.':
            c+=1
            L[i][w-1-j]=c
        else:
            c=0
for j in range(w):
    c=0
    for i in range(h):
        if M[i][j]=='.':
            c+=1
            D[i][j]=c
        else:
            c=0
for j in range(w):
    c=0
    for i in range(h):
        if M[h-1-i][j]=='.':
            c+=1
            U[h-1-i][j]=c
        else:
            c=0
r=0
for i in range(h):
    for j in range(w):
        r=max(r,R[i][j]+L[i][j]+D[i][j]+U[i][j]-3)
print(r)