h,w = map(int,input().split())
F = [input() for _ in range(h)]

MW = [[0]*w for _ in range(h)]
MH = [[0]*w for _ in range(h)]


for i in range(h):
  l = 0
  c = 0
  for r in range(w):    
    if F[i][r] == '#':
      for k in range(l,r):
        MW[i][k] = c
      l = r+1
      c = 0      
    else:
      c += 1
  for k in range(l,r+1):
    MW[i][k] = c  
    
for i in range(w):
  u = 0
  c = 0
  for b in range(h):    
    if F[b][i] == '#':
      for k in range(u,b):
        MH[k][i] = c
      u = b+1
      c = 0      
    else:
      c += 1
  for k in range(u,b+1):
    MH[k][i] = c      
    
ans = 0    
for i in range(h):
  for j in range(w):
    tmp = 0
    if F[i][j] != '#':
      tmp = MH[i][j]+MW[i][j] -1 
    ans = max(ans,tmp)
    
print(ans) h,w = map(int,input().split()) h map(int,input().split()) map int input().split() ().split () input split w input() for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) input() input F = [input() for _ in range(h)] F [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 MW = [[0]*w for _ in range(h)] MW [[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 MH = [[0]*w for _ in range(h)] MH [[0]*w for _ in range(h)] for i in range(h):
  l = 0
  c = 0
  for r in range(w):    
    if F[i][r] == '#':
      for k in range(l,r):
        MW[i][k] = c
      l = r+1
      c = 0      
    else:
      c += 1
  for k in range(l,r+1):
    MW[i][k] = c  
     i range(h) range h l = 0 l 0 c = 0 c 0 for r in range(w):    
    if F[i][r] == '#':
      for k in range(l,r):
        MW[i][k] = c
      l = r+1
      c = 0      
    else:
      c += 1
   r range(w) range w if F[i][r] == '#':
      for k in range(l,r):
        MW[i][k] = c
      l = r+1
      c = 0      
    else:
      c += 1
   F[i][r] == '#' F[i][r] [i] F i r '#' for k in range(l,r):
        MW[i][k] = c
       k range(l,r) range l r MW[i][k] = c MW[i][k] [i] MW i k c l = r+1 l r+1 r 1 c = 0 c 0 c += 1 c 1 for k in range(l,r+1):
    MW[i][k] = c  
     k range(l,r+1) range l r+1 r 1 MW[i][k] = c MW[i][k] [i] MW i k c for i in range(w):
  u = 0
  c = 0
  for b in range(h):    
    if F[b][i] == '#':
      for k in range(u,b):
        MH[k][i] = c
      u = b+1
      c = 0      
    else:
      c += 1
  for k in range(u,b+1):
    MH[k][i] = c      
     i range(w) range w u = 0 u 0 c = 0 c 0 for b in range(h):    
    if F[b][i] == '#':
      for k in range(u,b):
        MH[k][i] = c
      u = b+1
      c = 0      
    else:
      c += 1
   b range(h) range h if F[b][i] == '#':
      for k in range(u,b):
        MH[k][i] = c
      u = b+1
      c = 0      
    else:
      c += 1
   F[b][i] == '#' F[b][i] [b] F b i '#' for k in range(u,b):
        MH[k][i] = c
       k range(u,b) range u b MH[k][i] = c MH[k][i] [k] MH k i c u = b+1 u b+1 b 1 c = 0 c 0 c += 1 c 1 for k in range(u,b+1):
    MH[k][i] = c      
     k range(u,b+1) range u b+1 b 1 MH[k][i] = c MH[k][i] [k] MH k i c ans = 0 ans 0 for i in range(h):
  for j in range(w):
    tmp = 0
    if F[i][j] != '#':
      tmp = MH[i][j]+MW[i][j] -1 
    ans = max(ans,tmp)
     i range(h) range h for j in range(w):
    tmp = 0
    if F[i][j] != '#':
      tmp = MH[i][j]+MW[i][j] -1 
    ans = max(ans,tmp)
     j range(w) range w tmp = 0 tmp 0 if F[i][j] != '#':
      tmp = MH[i][j]+MW[i][j] -1 
     F[i][j] != '#' F[i][j] [i] F i j '#' tmp = MH[i][j]+MW[i][j] -1 tmp MH[i][j]+MW[i][j] -1 MH[i][j]+MW[i][j] MH[i][j] [i] MH i j MW[i][j] [i] MW i j 1 ans = max(ans,tmp) ans max(ans,tmp) max ans tmp print(ans) print ans c = 0 0 c w = map(int,input().split()) map(int,input().split()) w tmp = 0 0 tmp u = b+1 b+1 u F = [input() for _ in range(h)] [input() for _ in range(h)] F c += 1 1 c u = 0 0 u ans = max(ans,tmp) max(ans,tmp) ans l = 0 0 l c += 1 1 c c = 0 0 c l = r+1 r+1 l tmp = MH[i][j]+MW[i][j] -1 MH[i][j]+MW[i][j] -1 tmp MW = [[0]*w for _ in range(h)] [[0]*w for _ in range(h)] MW c = 0 0 c c = 0 0 c MH = [[0]*w for _ in range(h)] [[0]*w for _ in range(h)] MH h,w = map(int,input().split()) map(int,input().split()) h ans = 0 0 ans
h,w = map(int,input().split())
F = [input() for _ in range(h)]

MW = [[0]*w for _ in range(h)]
MH = [[0]*w for _ in range(h)]


for i in range(h):
  l = 0
  c = 0
  for r in range(w):    
    if F[i][r] == '#':
      for k in range(l,r):
        MW[i][k] = c
      l = r+1
      c = 0      
    else:
      c += 1
  for k in range(l,r+1):
    MW[i][k] = c  
    
for i in range(w):
  u = 0
  c = 0
  for b in range(h):    
    if F[b][i] == '#':
      for k in range(u,b):
        MH[k][i] = c
      u = b+1
      c = 0      
    else:
      c += 1
  for k in range(u,b+1):
    MH[k][i] = c      
    
ans = 0    
for i in range(h):
  for j in range(w):
    tmp = 0
    if F[i][j] != '#':
      tmp = MH[i][j]+MW[i][j] -1 
    ans = max(ans,tmp)
    
print(ans)