h,w=map(int, input().split())
maps=[[0]*w for i in range(h)]
for i in range(h):
    s=input()
    for j in range(w):
        if s[j]=="#":
            maps[i][j]=-1
    
maps_l=[[0]*w for i in range(h)]
maps_r=[[0]*w for i in range(h)]
maps_u=[[0]*w for i in range(h)]
maps_d=[[0]*w for i in range(h)]

for i in range(h):
    for j in range(w):
        if maps[i][j]==-1:
            maps_l[i][j]=0
        elif j==0:
            maps_l[i][j]=1
        else:
            maps_l[i][j]=maps_l[i][j-1]+1

for i in range(h):
    for j in range(w-1,-1,-1):
        if maps[i][j]==-1:
            maps_r[i][j]=0
        elif j==w-1:
            maps_r[i][j]=1
        else:
            maps_r[i][j]=maps_r[i][j+1]+1

for j in range(w):
    for i in range(h):
        if maps[i][j]==-1:
            maps_d[i][j]=0
        elif i==0:
            maps_d[i][j]=1
        else:
            maps_d[i][j]=maps_d[i-1][j]+1

for j in range(w):
    for i in range(h-1,-1,-1):
        if maps[i][j]==-1:
            maps_u[i][j]=0
        elif i==h-1:
            maps_u[i][j]=1
        else:
            maps_u[i][j]=maps_u[i+1][j]+1
ans=0
for i in range(h):
    for j in range(w):
        if maps[i][j]!=-1:
            ans=max(ans,maps_u[i][j]+maps_d[i][j]+maps_r[i][j]+maps_l[i][j]-3)

print(ans) h,w=map(int, input().split()) h map(int, input().split()) map int input().split() ().split () input split w [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 maps=[[0]*w for i in range(h)] maps [[0]*w for i in range(h)] for i in range(h):
    s=input()
    for j in range(w):
        if s[j]=="#":
            maps[i][j]=-1
     i range(h) range h s=input() s input() input for j in range(w):
        if s[j]=="#":
            maps[i][j]=-1
     j range(w) range w if s[j]=="#":
            maps[i][j]=-1
     s[j]=="#" s[j] s j "#" maps[i][j]=-1 maps[i][j] [i] maps i j -1 [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 maps_l=[[0]*w for i in range(h)] maps_l [[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 maps_r=[[0]*w for i in range(h)] maps_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 maps_u=[[0]*w for i in range(h)] maps_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 maps_d=[[0]*w for i in range(h)] maps_d [[0]*w for i in range(h)] for i in range(h):
    for j in range(w):
        if maps[i][j]==-1:
            maps_l[i][j]=0
        elif j==0:
            maps_l[i][j]=1
        else:
            maps_l[i][j]=maps_l[i][j-1]+1 i range(h) range h for j in range(w):
        if maps[i][j]==-1:
            maps_l[i][j]=0
        elif j==0:
            maps_l[i][j]=1
        else:
            maps_l[i][j]=maps_l[i][j-1]+1 j range(w) range w if maps[i][j]==-1:
            maps_l[i][j]=0
        elif j==0:
            maps_l[i][j]=1
        else:
            maps_l[i][j]=maps_l[i][j-1]+1 maps[i][j]==-1 maps[i][j] [i] maps i j -1 maps_l[i][j]=0 maps_l[i][j] [i] maps_l i j 0 elif j==0:
            maps_l[i][j]=1
         j==0 j 0 maps_l[i][j]=1 maps_l[i][j] [i] maps_l i j 1 maps_l[i][j]=maps_l[i][j-1]+1 maps_l[i][j] [i] maps_l i j maps_l[i][j-1]+1 maps_l[i][j-1] [i] maps_l i j-1 j 1 1 for i in range(h):
    for j in range(w-1,-1,-1):
        if maps[i][j]==-1:
            maps_r[i][j]=0
        elif j==w-1:
            maps_r[i][j]=1
        else:
            maps_r[i][j]=maps_r[i][j+1]+1 i range(h) range h for j in range(w-1,-1,-1):
        if maps[i][j]==-1:
            maps_r[i][j]=0
        elif j==w-1:
            maps_r[i][j]=1
        else:
            maps_r[i][j]=maps_r[i][j+1]+1 j range(w-1,-1,-1) range w-1 w 1 -1 -1 if maps[i][j]==-1:
            maps_r[i][j]=0
        elif j==w-1:
            maps_r[i][j]=1
        else:
            maps_r[i][j]=maps_r[i][j+1]+1 maps[i][j]==-1 maps[i][j] [i] maps i j -1 maps_r[i][j]=0 maps_r[i][j] [i] maps_r i j 0 elif j==w-1:
            maps_r[i][j]=1
         j==w-1 j w-1 w 1 maps_r[i][j]=1 maps_r[i][j] [i] maps_r i j 1 maps_r[i][j]=maps_r[i][j+1]+1 maps_r[i][j] [i] maps_r i j maps_r[i][j+1]+1 maps_r[i][j+1] [i] maps_r i j+1 j 1 1 for j in range(w):
    for i in range(h):
        if maps[i][j]==-1:
            maps_d[i][j]=0
        elif i==0:
            maps_d[i][j]=1
        else:
            maps_d[i][j]=maps_d[i-1][j]+1 j range(w) range w for i in range(h):
        if maps[i][j]==-1:
            maps_d[i][j]=0
        elif i==0:
            maps_d[i][j]=1
        else:
            maps_d[i][j]=maps_d[i-1][j]+1 i range(h) range h if maps[i][j]==-1:
            maps_d[i][j]=0
        elif i==0:
            maps_d[i][j]=1
        else:
            maps_d[i][j]=maps_d[i-1][j]+1 maps[i][j]==-1 maps[i][j] [i] maps i j -1 maps_d[i][j]=0 maps_d[i][j] [i] maps_d i j 0 elif i==0:
            maps_d[i][j]=1
         i==0 i 0 maps_d[i][j]=1 maps_d[i][j] [i] maps_d i j 1 maps_d[i][j]=maps_d[i-1][j]+1 maps_d[i][j] [i] maps_d i j maps_d[i-1][j]+1 maps_d[i-1][j] [i-1] maps_d i-1 i 1 j 1 for j in range(w):
    for i in range(h-1,-1,-1):
        if maps[i][j]==-1:
            maps_u[i][j]=0
        elif i==h-1:
            maps_u[i][j]=1
        else:
            maps_u[i][j]=maps_u[i+1][j]+1 j range(w) range w for i in range(h-1,-1,-1):
        if maps[i][j]==-1:
            maps_u[i][j]=0
        elif i==h-1:
            maps_u[i][j]=1
        else:
            maps_u[i][j]=maps_u[i+1][j]+1 i range(h-1,-1,-1) range h-1 h 1 -1 -1 if maps[i][j]==-1:
            maps_u[i][j]=0
        elif i==h-1:
            maps_u[i][j]=1
        else:
            maps_u[i][j]=maps_u[i+1][j]+1 maps[i][j]==-1 maps[i][j] [i] maps i j -1 maps_u[i][j]=0 maps_u[i][j] [i] maps_u i j 0 elif i==h-1:
            maps_u[i][j]=1
         i==h-1 i h-1 h 1 maps_u[i][j]=1 maps_u[i][j] [i] maps_u i j 1 maps_u[i][j]=maps_u[i+1][j]+1 maps_u[i][j] [i] maps_u i j maps_u[i+1][j]+1 maps_u[i+1][j] [i+1] maps_u i+1 i 1 j 1 ans=0 ans 0 for i in range(h):
    for j in range(w):
        if maps[i][j]!=-1:
            ans=max(ans,maps_u[i][j]+maps_d[i][j]+maps_r[i][j]+maps_l[i][j]-3) i range(h) range h for j in range(w):
        if maps[i][j]!=-1:
            ans=max(ans,maps_u[i][j]+maps_d[i][j]+maps_r[i][j]+maps_l[i][j]-3) j range(w) range w if maps[i][j]!=-1:
            ans=max(ans,maps_u[i][j]+maps_d[i][j]+maps_r[i][j]+maps_l[i][j]-3) maps[i][j]!=-1 maps[i][j] [i] maps i j -1 ans=max(ans,maps_u[i][j]+maps_d[i][j]+maps_r[i][j]+maps_l[i][j]-3) ans max(ans,maps_u[i][j]+maps_d[i][j]+maps_r[i][j]+maps_l[i][j]-3) max ans maps_u[i][j]+maps_d[i][j]+maps_r[i][j]+maps_l[i][j]-3 maps_u[i][j]+maps_d[i][j]+maps_r[i][j]+maps_l[i][j] maps_u[i][j]+maps_d[i][j]+maps_r[i][j] maps_u[i][j]+maps_d[i][j] maps_u[i][j] [i] maps_u i j maps_d[i][j] [i] maps_d i j maps_r[i][j] [i] maps_r i j maps_l[i][j] [i] maps_l i j 3 print(ans) print ans ans=0 0 ans w=map(int, input().split()) map(int, input().split()) w maps_d=[[0]*w for i in range(h)] [[0]*w for i in range(h)] maps_d maps=[[0]*w for i in range(h)] [[0]*w for i in range(h)] maps s=input() input() s maps_l=[[0]*w for i in range(h)] [[0]*w for i in range(h)] maps_l maps_r=[[0]*w for i in range(h)] [[0]*w for i in range(h)] maps_r maps_u=[[0]*w for i in range(h)] [[0]*w for i in range(h)] maps_u ans=max(ans,maps_u[i][j]+maps_d[i][j]+maps_r[i][j]+maps_l[i][j]-3) max(ans,maps_u[i][j]+maps_d[i][j]+maps_r[i][j]+maps_l[i][j]-3) ans h,w=map(int, input().split()) map(int, input().split()) h
h,w=map(int, input().split())
maps=[[0]*w for i in range(h)]
for i in range(h):
    s=input()
    for j in range(w):
        if s[j]=="#":
            maps[i][j]=-1
    
maps_l=[[0]*w for i in range(h)]
maps_r=[[0]*w for i in range(h)]
maps_u=[[0]*w for i in range(h)]
maps_d=[[0]*w for i in range(h)]

for i in range(h):
    for j in range(w):
        if maps[i][j]==-1:
            maps_l[i][j]=0
        elif j==0:
            maps_l[i][j]=1
        else:
            maps_l[i][j]=maps_l[i][j-1]+1

for i in range(h):
    for j in range(w-1,-1,-1):
        if maps[i][j]==-1:
            maps_r[i][j]=0
        elif j==w-1:
            maps_r[i][j]=1
        else:
            maps_r[i][j]=maps_r[i][j+1]+1

for j in range(w):
    for i in range(h):
        if maps[i][j]==-1:
            maps_d[i][j]=0
        elif i==0:
            maps_d[i][j]=1
        else:
            maps_d[i][j]=maps_d[i-1][j]+1

for j in range(w):
    for i in range(h-1,-1,-1):
        if maps[i][j]==-1:
            maps_u[i][j]=0
        elif i==h-1:
            maps_u[i][j]=1
        else:
            maps_u[i][j]=maps_u[i+1][j]+1
ans=0
for i in range(h):
    for j in range(w):
        if maps[i][j]!=-1:
            ans=max(ans,maps_u[i][j]+maps_d[i][j]+maps_r[i][j]+maps_l[i][j]-3)

print(ans)