h,w=map(int,input().split())
s=[input() for _ in range(h)]
hdp=[[0]*w for _ in range(h)] # hdp[i][j]:i,jマスに明かりを置いた時のてらせる縦マス数
wdp=[[0]*w for _ in range(h)] # wdp[i][j]:i,jマスに明かりを置いた時のてらせる横マス数
for i in range(h):
  for j in range(w):
    if s[i][j]=='#':
      continue
    if j>0 and wdp[i][j-1]>0:
      wdp[i][j]=wdp[i][j-1]
    else:
      for k in range(j,w):
        if s[i][k]=='#':
          break
        wdp[i][j]+=1
    if i>0 and hdp[i-1][j]>0:
      hdp[i][j]=hdp[i-1][j]
    else:
      for k in range(i,h):
        if s[k][j]=='#':
          break
        hdp[i][j]+=1
ans=0
for i in range(h):
  for j in range(w):
    ans=max(ans,hdp[i][j]+wdp[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 _ 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 hdp=[[0]*w for _ in range(h)] hdp [[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 wdp=[[0]*w for _ in range(h)] wdp [[0]*w for _ in range(h)] for i in range(h):
  for j in range(w):
    if s[i][j]=='#':
      continue
    if j>0 and wdp[i][j-1]>0:
      wdp[i][j]=wdp[i][j-1]
    else:
      for k in range(j,w):
        if s[i][k]=='#':
          break
        wdp[i][j]+=1
    if i>0 and hdp[i-1][j]>0:
      hdp[i][j]=hdp[i-1][j]
    else:
      for k in range(i,h):
        if s[k][j]=='#':
          break
        hdp[i][j]+=1 i range(h) range h for j in range(w):
    if s[i][j]=='#':
      continue
    if j>0 and wdp[i][j-1]>0:
      wdp[i][j]=wdp[i][j-1]
    else:
      for k in range(j,w):
        if s[i][k]=='#':
          break
        wdp[i][j]+=1
    if i>0 and hdp[i-1][j]>0:
      hdp[i][j]=hdp[i-1][j]
    else:
      for k in range(i,h):
        if s[k][j]=='#':
          break
        hdp[i][j]+=1 j range(w) range w if s[i][j]=='#':
      continue
     s[i][j]=='#' s[i][j] [i] s i j '#' continue if j>0 and wdp[i][j-1]>0:
      wdp[i][j]=wdp[i][j-1]
    else:
      for k in range(j,w):
        if s[i][k]=='#':
          break
        wdp[i][j]+=1
     j>0 and wdp[i][j-1]>0 j>0 j 0 wdp[i][j-1]>0 wdp[i][j-1] [i] wdp i j-1 j 1 0 wdp[i][j]=wdp[i][j-1] wdp[i][j] [i] wdp i j wdp[i][j-1] [i] wdp i j-1 j 1 for k in range(j,w):
        if s[i][k]=='#':
          break
        wdp[i][j]+=1
     k range(j,w) range j w if s[i][k]=='#':
          break
         s[i][k]=='#' s[i][k] [i] s i k '#' break wdp[i][j]+=1 wdp[i][j] [i] wdp i j 1 if i>0 and hdp[i-1][j]>0:
      hdp[i][j]=hdp[i-1][j]
    else:
      for k in range(i,h):
        if s[k][j]=='#':
          break
        hdp[i][j]+=1 i>0 and hdp[i-1][j]>0 i>0 i 0 hdp[i-1][j]>0 hdp[i-1][j] [i-1] hdp i-1 i 1 j 0 hdp[i][j]=hdp[i-1][j] hdp[i][j] [i] hdp i j hdp[i-1][j] [i-1] hdp i-1 i 1 j for k in range(i,h):
        if s[k][j]=='#':
          break
        hdp[i][j]+=1 k range(i,h) range i h if s[k][j]=='#':
          break
         s[k][j]=='#' s[k][j] [k] s k j '#' break hdp[i][j]+=1 hdp[i][j] [i] hdp i j 1 ans=0 ans 0 for i in range(h):
  for j in range(w):
    ans=max(ans,hdp[i][j]+wdp[i][j]-1) i range(h) range h for j in range(w):
    ans=max(ans,hdp[i][j]+wdp[i][j]-1) j range(w) range w ans=max(ans,hdp[i][j]+wdp[i][j]-1) ans max(ans,hdp[i][j]+wdp[i][j]-1) max ans hdp[i][j]+wdp[i][j]-1 hdp[i][j]+wdp[i][j] hdp[i][j] [i] hdp i j wdp[i][j] [i] wdp i j 1 print(ans) print ans h,w=map(int,input().split()) map(int,input().split()) h ans=max(ans,hdp[i][j]+wdp[i][j]-1) max(ans,hdp[i][j]+wdp[i][j]-1) ans s=[input() for _ in range(h)] [input() for _ in range(h)] s wdp=[[0]*w for _ in range(h)] [[0]*w for _ in range(h)] wdp ans=0 0 ans w=map(int,input().split()) map(int,input().split()) w hdp=[[0]*w for _ in range(h)] [[0]*w for _ in range(h)] hdp
h,w=map(int,input().split())
s=[input() for _ in range(h)]
hdp=[[0]*w for _ in range(h)] # hdp[i][j]:i,jマスに明かりを置いた時のてらせる縦マス数
wdp=[[0]*w for _ in range(h)] # wdp[i][j]:i,jマスに明かりを置いた時のてらせる横マス数
for i in range(h):
  for j in range(w):
    if s[i][j]=='#':
      continue
    if j>0 and wdp[i][j-1]>0:
      wdp[i][j]=wdp[i][j-1]
    else:
      for k in range(j,w):
        if s[i][k]=='#':
          break
        wdp[i][j]+=1
    if i>0 and hdp[i-1][j]>0:
      hdp[i][j]=hdp[i-1][j]
    else:
      for k in range(i,h):
        if s[k][j]=='#':
          break
        hdp[i][j]+=1
ans=0
for i in range(h):
  for j in range(w):
    ans=max(ans,hdp[i][j]+wdp[i][j]-1)
print(ans)
