h,w=map(int,input().split())
s=[input() for _ in range(h)]
d1=[[0]*(w+1) for _ in range(h+1)]
d2=[[0]*(w+1) for _ in range(h+1)]
for i in range(h):
  k=1
  for j in range(w):
    if s[i][j]=='.':d1[i+1][k]+=1
    else:k=j+2
  for j in range(w):
    if s[i][j]=='.':d1[i+1][j+1]+=d1[i+1][j]
for j in range(w):
  k=1
  for i in range(h):
    if s[i][j]=='.':d2[k][j+1]+=1
    else:k=i+2
  for i in range(h):
    if s[i][j]=='.':d2[i+1][j+1]+=d2[i][j+1]
ans=0
for i in range(1,h+1):
  for j in range(1,w+1):
    d1[i][j]+=d2[i][j]-1
  ans=max(ans,max(d1[i]))
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 s=[input() for _ in range(h)] s [input() for _ in range(h)] [0]*(w+1) for _ in range(h+1) for _ in range(h+1) _ range(h+1) range h+1 h 1 for _ in range(h+1) [0]*(w+1) [0] 0 w+1 w 1 d1=[[0]*(w+1) for _ in range(h+1)] d1 [[0]*(w+1) for _ in range(h+1)] [0]*(w+1) for _ in range(h+1) for _ in range(h+1) _ range(h+1) range h+1 h 1 for _ in range(h+1) [0]*(w+1) [0] 0 w+1 w 1 d2=[[0]*(w+1) for _ in range(h+1)] d2 [[0]*(w+1) for _ in range(h+1)] for i in range(h):
  k=1
  for j in range(w):
    if s[i][j]=='.':d1[i+1][k]+=1
    else:k=j+2
  for j in range(w):
    if s[i][j]=='.':d1[i+1][j+1]+=d1[i+1][j] i range(h) range h k=1 k 1 for j in range(w):
    if s[i][j]=='.':d1[i+1][k]+=1
    else:k=j+2
   j range(w) range w if s[i][j]=='.':d1[i+1][k]+=1
    else:k=j+2
   s[i][j]=='.' s[i][j] [i] s i j '.' for j in range(w):
    if s[i][j]=='.':d1[i+1][j+1]+=d1[i+1][j] j range(w) range w if s[i][j]=='.':d1[i+1][j+1]+=d1[i+1 s[i][j]=='.' s[i][j] [i] s i j '.' for j in range(w):
  k=1
  for i in range(h):
    if s[i][j]=='.':d2[k][j+1]+=1
    else:k=i+2
  for i in range(h):
    if s[i][j]=='.':d2[i+1][j+1]+=d2[i][j+1] j range(w) range w k=1 k 1 for i in range(h):
    if s[i][j]=='.':d2[k][j+1]+=1
    else:k=i+2
   i range(h) range h if s[i][j]=='.':d2[k][j+1]+=1
    else:k=i+2
   s[i][j]=='.' s[i][j] [i] s i j '.' for i in range(h):
    if s[i][j]=='.':d2[i+1][j+1]+=d2[i][j+1] i range(h) range h if s[i][j]=='.':d2[i+1][j+1]+=d2[i][ s[i][j]=='.' s[i][j] [i] s i j '.' ans=0 ans 0 for i in range(1,h+1):
  for j in range(1,w+1):
    d1[i][j]+=d2[i][j]-1
  ans=max(ans,max(d1[i])) i range(1,h+1) range 1 h+1 h 1 for j in range(1,w+1):
    d1[i][j]+=d2[i][j]-1
   j range(1,w+1) range 1 w+1 w 1 d1[i][j]+=d2[i][j]-1 d1[i][j] [i] d1 i j d2[i][j]-1 d2[i][j] [i] d2 i j 1 ans=max(ans,max(d1[i])) ans max(ans,max(d1[i])) max ans max(d1[i]) max d1[i] d1 i print(ans) print ans s=[input() for _ in range(h)] [input() for _ in range(h)] s w=map(int,input().split()) map(int,input().split()) w k=1 1 k ans=0 0 ans d1=[[0]*(w+1) for _ in range(h+1)] [[0]*(w+1) for _ in range(h+1)] d1 ans=max(ans,max(d1[i])) max(ans,max(d1[i])) ans d2=[[0]*(w+1) for _ in range(h+1)] [[0]*(w+1) for _ in range(h+1)] d2 k=1 1 k h,w=map(int,input().split()) map(int,input().split()) h
h,w=map(int,input().split())
s=[input() for _ in range(h)]
d1=[[0]*(w+1) for _ in range(h+1)]
d2=[[0]*(w+1) for _ in range(h+1)]
for i in range(h):
  k=1
  for j in range(w):
    if s[i][j]=='.':d1[i+1][k]+=1
    else:k=j+2
  for j in range(w):
    if s[i][j]=='.':d1[i+1][j+1]+=d1[i+1][j]
for j in range(w):
  k=1
  for i in range(h):
    if s[i][j]=='.':d2[k][j+1]+=1
    else:k=i+2
  for i in range(h):
    if s[i][j]=='.':d2[i+1][j+1]+=d2[i][j+1]
ans=0
for i in range(1,h+1):
  for j in range(1,w+1):
    d1[i][j]+=d2[i][j]-1
  ans=max(ans,max(d1[i]))
print(ans)