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