H,W=map(int,input().split())
G=[ ]

for i in range(H):
  G.append(list(input()))
  
L=[[0]*W for i in range(H)]
R=[[0]*W for i in range(H)]
U=[[0]*W for i in range(H)]
D=[[0]*W for i in range(H)]

for i in range(H):
  for j in range(W):
    k=-i-1
    l=-j-1
    if G[i][j]=="#":
      L[i][j]=0
      U[i][j]=0
    else:
      if j==0:
        L[i][j]=1
        U[i][j]=U[i-1][j]+1
      elif i==0:
        L[i][j]=L[i][j-1]+1
        U[i][j]=1
      else:
        L[i][j]=L[i][j-1]+1
        U[i][j]=U[i-1][j]+1
        
    if G[k][l]=="#":
      R[k][l]=0
      D[k][l]=0
    else:
      if k==-1:
        R[k][l]=1
        D[k][l]=D[k+1][l]+1
      elif i==0:
        R[k][l]=R[k][l+1]+1
        D[k][l]=1
      else:
        R[k][l]=R[k][l+1]+1
        D[k][l]=D[k+1][l]+1
ans=0
for i in range(H):
  for j in range(W):
    #print(L[i][j],R[i][j],U[i][j],D[i][j])
    ans=max(R[i][j]+L[i][j]+U[i][j]+D[i][j]-3,ans)
print(ans) H,W=map(int,input().split()) H map(int,input().split()) map int input().split() ().split () input split W G=[ ] G [ ] for i in range(H):
  G.append(list(input()))
   i range(H) range H G.append(list(input())) G.append G append list(input()) list input() input [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)] [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 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 D=[[0]*W for i in range(H)] D [[0]*W for i in range(H)] for i in range(H):
  for j in range(W):
    k=-i-1
    l=-j-1
    if G[i][j]=="#":
      L[i][j]=0
      U[i][j]=0
    else:
      if j==0:
        L[i][j]=1
        U[i][j]=U[i-1][j]+1
      elif i==0:
        L[i][j]=L[i][j-1]+1
        U[i][j]=1
      else:
        L[i][j]=L[i][j-1]+1
        U[i][j]=U[i-1][j]+1
        
    if G[k][l]=="#":
      R[k][l]=0
      D[k][l]=0
    else:
      if k==-1:
        R[k][l]=1
        D[k][l]=D[k+1][l]+1
      elif i==0:
        R[k][l]=R[k][l+1]+1
        D[k][l]=1
      else:
        R[k][l]=R[k][l+1]+1
        D[k][l]=D[k+1][l]+1 i range(H) range H for j in range(W):
    k=-i-1
    l=-j-1
    if G[i][j]=="#":
      L[i][j]=0
      U[i][j]=0
    else:
      if j==0:
        L[i][j]=1
        U[i][j]=U[i-1][j]+1
      elif i==0:
        L[i][j]=L[i][j-1]+1
        U[i][j]=1
      else:
        L[i][j]=L[i][j-1]+1
        U[i][j]=U[i-1][j]+1
        
    if G[k][l]=="#":
      R[k][l]=0
      D[k][l]=0
    else:
      if k==-1:
        R[k][l]=1
        D[k][l]=D[k+1][l]+1
      elif i==0:
        R[k][l]=R[k][l+1]+1
        D[k][l]=1
      else:
        R[k][l]=R[k][l+1]+1
        D[k][l]=D[k+1][l]+1 j range(W) range W k=-i-1 k -i-1 -i i 1 l=-j-1 l -j-1 -j j 1 if G[i][j]=="#":
      L[i][j]=0
      U[i][j]=0
    else:
      if j==0:
        L[i][j]=1
        U[i][j]=U[i-1][j]+1
      elif i==0:
        L[i][j]=L[i][j-1]+1
        U[i][j]=1
      else:
        L[i][j]=L[i][j-1]+1
        U[i][j]=U[i-1][j]+1
        
     G[i][j]=="#" G[i][j] [i] G i j "#" L[i][j]=0 L[i][j] [i] L i j 0 U[i][j]=0 U[i][j] [i] U i j 0 if j==0:
        L[i][j]=1
        U[i][j]=U[i-1][j]+1
      elif i==0:
        L[i][j]=L[i][j-1]+1
        U[i][j]=1
      else:
        L[i][j]=L[i][j-1]+1
        U[i][j]=U[i-1][j]+1
        
     j==0 j 0 L[i][j]=1 L[i][j] [i] L i j 1 U[i][j]=U[i-1][j]+1 U[i][j] [i] U i j U[i-1][j]+1 U[i-1][j] [i-1] U i-1 i 1 j 1 elif i==0:
        L[i][j]=L[i][j-1]+1
        U[i][j]=1
       i==0 i 0 L[i][j]=L[i][j-1]+1 L[i][j] [i] L i j L[i][j-1]+1 L[i][j-1] [i] L i j-1 j 1 1 U[i][j]=1 U[i][j] [i] U i j 1 L[i][j]=L[i][j-1]+1 L[i][j] [i] L i j L[i][j-1]+1 L[i][j-1] [i] L i j-1 j 1 1 U[i][j]=U[i-1][j]+1 U[i][j] [i] U i j U[i-1][j]+1 U[i-1][j] [i-1] U i-1 i 1 j 1 if G[k][l]=="#":
      R[k][l]=0
      D[k][l]=0
    else:
      if k==-1:
        R[k][l]=1
        D[k][l]=D[k+1][l]+1
      elif i==0:
        R[k][l]=R[k][l+1]+1
        D[k][l]=1
      else:
        R[k][l]=R[k][l+1]+1
        D[k][l]=D[k+1][l]+1 G[k][l]=="#" G[k][l] [k] G k l "#" R[k][l]=0 R[k][l] [k] R k l 0 D[k][l]=0 D[k][l] [k] D k l 0 if k==-1:
        R[k][l]=1
        D[k][l]=D[k+1][l]+1
      elif i==0:
        R[k][l]=R[k][l+1]+1
        D[k][l]=1
      else:
        R[k][l]=R[k][l+1]+1
        D[k][l]=D[k+1][l]+1 k==-1 k -1 R[k][l]=1 R[k][l] [k] R k l 1 D[k][l]=D[k+1][l]+1 D[k][l] [k] D k l D[k+1][l]+1 D[k+1][l] [k+1] D k+1 k 1 l 1 elif i==0:
        R[k][l]=R[k][l+1]+1
        D[k][l]=1
       i==0 i 0 R[k][l]=R[k][l+1]+1 R[k][l] [k] R k l R[k][l+1]+1 R[k][l+1] [k] R k l+1 l 1 1 D[k][l]=1 D[k][l] [k] D k l 1 R[k][l]=R[k][l+1]+1 R[k][l] [k] R k l R[k][l+1]+1 R[k][l+1] [k] R k l+1 l 1 1 D[k][l]=D[k+1][l]+1 D[k][l] [k] D k l D[k+1][l]+1 D[k+1][l] [k+1] D k+1 k 1 l 1 ans=0 ans 0 for i in range(H):
  for j in range(W):
    #print(L[i][j],R[i][j],U[i][j],D[i][j])
    ans=max(R[i][j]+L[i][j]+U[i][j]+D[i][j]-3,ans) i range(H) range H for j in range(W):
    #print(L[i][j],R[i][j],U[i][j],D[i][j])
    ans=max(R[i][j]+L[i][j]+U[i][j]+D[i][j]-3,ans) j range(W) range W ans=max(R[i][j]+L[i][j]+U[i][j]+D[i][j]-3,ans) ans max(R[i][j]+L[i][j]+U[i][j]+D[i][j]-3,ans) max R[i][j]+L[i][j]+U[i][j]+D[i][j]-3 R[i][j]+L[i][j]+U[i][j]+D[i][j] R[i][j]+L[i][j]+U[i][j] R[i][j]+L[i][j] R[i][j] [i] R i j L[i][j] [i] L i j U[i][j] [i] U i j D[i][j] [i] D i j 3 ans print(ans) print ans H,W=map(int,input().split()) map(int,input().split()) H ans=max(R[i][j]+L[i][j]+U[i][j]+D[i][j]-3,ans) max(R[i][j]+L[i][j]+U[i][j]+D[i][j]-3,ans) ans ans=0 0 ans L=[[0]*W for i in range(H)] [[0]*W for i in range(H)] L W=map(int,input().split()) map(int,input().split()) W U=[[0]*W for i in range(H)] [[0]*W for i in range(H)] U D=[[0]*W for i in range(H)] [[0]*W for i in range(H)] D k=-i-1 -i-1 k R=[[0]*W for i in range(H)] [[0]*W for i in range(H)] R l=-j-1 -j-1 l G=[ ] [ ] G
H,W=map(int,input().split())
G=[ ]

for i in range(H):
  G.append(list(input()))
  
L=[[0]*W for i in range(H)]
R=[[0]*W for i in range(H)]
U=[[0]*W for i in range(H)]
D=[[0]*W for i in range(H)]

for i in range(H):
  for j in range(W):
    k=-i-1
    l=-j-1
    if G[i][j]=="#":
      L[i][j]=0
      U[i][j]=0
    else:
      if j==0:
        L[i][j]=1
        U[i][j]=U[i-1][j]+1
      elif i==0:
        L[i][j]=L[i][j-1]+1
        U[i][j]=1
      else:
        L[i][j]=L[i][j-1]+1
        U[i][j]=U[i-1][j]+1
        
    if G[k][l]=="#":
      R[k][l]=0
      D[k][l]=0
    else:
      if k==-1:
        R[k][l]=1
        D[k][l]=D[k+1][l]+1
      elif i==0:
        R[k][l]=R[k][l+1]+1
        D[k][l]=1
      else:
        R[k][l]=R[k][l+1]+1
        D[k][l]=D[k+1][l]+1
ans=0
for i in range(H):
  for j in range(W):
    #print(L[i][j],R[i][j],U[i][j],D[i][j])
    ans=max(R[i][j]+L[i][j]+U[i][j]+D[i][j]-3,ans)
print(ans)