h,w=map(int,input().split())
s=[input()+'#' for i in range(h)]
s.append('#'*(w+1))
h1=[[0]*(w+1) for i in range(h+1)]
w1=[[0]*(w+1) for i in range(h+1)]
for j in range(h):
  r=0
  for i in range(w+1):
    if s[j][i]=='#':
      for k in range(i-r,i+1):
        h1[j][k]=r
      r=0
      h1[j][i]=0
    else:
      r+=1
for j in range(w):
  r=0
  for i in range(h+1):
    if s[i][j]=='#':
      for k in range(i-r,i+1):
        w1[k][j]=r
      r=0
      w1[i][j]=0
    else:
      r+=1
ans=0
for i in range(h):
  for j in range(w):
    ans=max(ans,h1[i][j]+w1[i][j]-1)
print(ans) h,w=map(int,input().split()) h map(int,input().split()) map int input().split() ().split () input split w input()+'#' for i in range(h) for i in range(h) i range(h) range h for i in range(h) input()+'#' input() input '#' s=[input()+'#' for i in range(h)] s [input()+'#' for i in range(h)] s.append('#'*(w+1)) s.append s append '#'*(w+1) '#' w+1 w 1 [0]*(w+1) for i in range(h+1) for i in range(h+1) i range(h+1) range h+1 h 1 for i in range(h+1) [0]*(w+1) [0] 0 w+1 w 1 h1=[[0]*(w+1) for i in range(h+1)] h1 [[0]*(w+1) for i in range(h+1)] [0]*(w+1) for i in range(h+1) for i in range(h+1) i range(h+1) range h+1 h 1 for i in range(h+1) [0]*(w+1) [0] 0 w+1 w 1 w1=[[0]*(w+1) for i in range(h+1)] w1 [[0]*(w+1) for i in range(h+1)] for j in range(h):
  r=0
  for i in range(w+1):
    if s[j][i]=='#':
      for k in range(i-r,i+1):
        h1[j][k]=r
      r=0
      h1[j][i]=0
    else:
      r+=1 j range(h) range h r=0 r 0 for i in range(w+1):
    if s[j][i]=='#':
      for k in range(i-r,i+1):
        h1[j][k]=r
      r=0
      h1[j][i]=0
    else:
      r+=1 i range(w+1) range w+1 w 1 if s[j][i]=='#':
      for k in range(i-r,i+1):
        h1[j][k]=r
      r=0
      h1[j][i]=0
    else:
      r+=1 s[j][i]=='#' s[j][i] [j] s j i '#' for k in range(i-r,i+1):
        h1[j][k]=r
       k range(i-r,i+1) range i-r i r i+1 i 1 h1[j][k]=r h1[j][k] [j] h1 j k r r=0 r 0 h1[j][i]=0 h1[j][i] [j] h1 j i 0 r+=1 r 1 for j in range(w):
  r=0
  for i in range(h+1):
    if s[i][j]=='#':
      for k in range(i-r,i+1):
        w1[k][j]=r
      r=0
      w1[i][j]=0
    else:
      r+=1 j range(w) range w r=0 r 0 for i in range(h+1):
    if s[i][j]=='#':
      for k in range(i-r,i+1):
        w1[k][j]=r
      r=0
      w1[i][j]=0
    else:
      r+=1 i range(h+1) range h+1 h 1 if s[i][j]=='#':
      for k in range(i-r,i+1):
        w1[k][j]=r
      r=0
      w1[i][j]=0
    else:
      r+=1 s[i][j]=='#' s[i][j] [i] s i j '#' for k in range(i-r,i+1):
        w1[k][j]=r
       k range(i-r,i+1) range i-r i r i+1 i 1 w1[k][j]=r w1[k][j] [k] w1 k j r r=0 r 0 w1[i][j]=0 w1[i][j] [i] w1 i j 0 r+=1 r 1 ans=0 ans 0 for i in range(h):
  for j in range(w):
    ans=max(ans,h1[i][j]+w1[i][j]-1) i range(h) range h for j in range(w):
    ans=max(ans,h1[i][j]+w1[i][j]-1) j range(w) range w ans=max(ans,h1[i][j]+w1[i][j]-1) ans max(ans,h1[i][j]+w1[i][j]-1) max ans h1[i][j]+w1[i][j]-1 h1[i][j]+w1[i][j] h1[i][j] [i] h1 i j w1[i][j] [i] w1 i j 1 print(ans) print ans r+=1 1 r h,w=map(int,input().split()) map(int,input().split()) h r+=1 1 r r=0 0 r ans=max(ans,h1[i][j]+w1[i][j]-1) max(ans,h1[i][j]+w1[i][j]-1) ans h1=[[0]*(w+1) for i in range(h+1)] [[0]*(w+1) for i in range(h+1)] h1 r=0 0 r w1=[[0]*(w+1) for i in range(h+1)] [[0]*(w+1) for i in range(h+1)] w1 ans=0 0 ans r=0 0 r s=[input()+'#' for i in range(h)] [input()+'#' for i in range(h)] s r=0 0 r w=map(int,input().split()) map(int,input().split()) w
h,w=map(int,input().split())
s=[input()+'#' for i in range(h)]
s.append('#'*(w+1))
h1=[[0]*(w+1) for i in range(h+1)]
w1=[[0]*(w+1) for i in range(h+1)]
for j in range(h):
  r=0
  for i in range(w+1):
    if s[j][i]=='#':
      for k in range(i-r,i+1):
        h1[j][k]=r
      r=0
      h1[j][i]=0
    else:
      r+=1
for j in range(w):
  r=0
  for i in range(h+1):
    if s[i][j]=='#':
      for k in range(i-r,i+1):
        w1[k][j]=r
      r=0
      w1[i][j]=0
    else:
      r+=1
ans=0
for i in range(h):
  for j in range(w):
    ans=max(ans,h1[i][j]+w1[i][j]-1)
print(ans)