h,w=list(map(int,input().split()))
m=[]
for i in range(h):
  mm=[]
  for j in input():
    mm.append(1 if j=="#" else 0)
  m.append(mm)

wl=[[0 for i in range(w)]for j in range(h)]
for i in range(h):
  s=0
  t=0
  while t<w:
    while t<w and m[i][t]==0:
      t+=1
    for j in range(s,t):
      wl[i][j]=t-s
    s=t+1
    t=t+1
mx=0
for i in range(w):
  s=0
  t=0
  while t<h:
    while t<h and m[t][i]==0:
      t+=1
    for j in range(s,t):
      k=wl[j][i]
      if mx<k+t-s:
        mx=k+t-s
    s=t+1
    t=t+1


print(mx-1) h,w=list(map(int,input().split())) h list(map(int,input().split())) list map(int,input().split()) map int input().split() ().split () input split w m=[] m [] for i in range(h):
  mm=[]
  for j in input():
    mm.append(1 if j=="#" else 0)
  m.append(mm) i range(h) range h mm=[] mm [] for j in input():
    mm.append(1 if j=="#" else 0)
   j input() input mm.append(1 if j=="#" else 0) mm.append mm append 1 if j=="#" else 0 j=="#" j "#" 1 0 m.append(mm) m.append m append mm [0 for i in range(w)]for j in range(h) for j in range(h) j range(h) range h for j in range(h) [0 for i in range(w)] wl=[[0 for i in range(w)]for j in range(h)] wl [[0 for i in range(w)]for j in range(h)] for i in range(h):
  s=0
  t=0
  while t<w:
    while t<w and m[i][t]==0:
      t+=1
    for j in range(s,t):
      wl[i][j]=t-s
    s=t+1
    t=t+1 i range(h) range h s=0 s 0 t=0 t 0 while t<w:
    while t<w and m[i][t]==0:
      t+=1
    for j in range(s,t):
      wl[i][j]=t-s
    s=t+1
    t=t+1 t<w t w while t<w and m[i][t]==0:
      t+=1
     t<w and m[i][t]==0 t<w t w m[i][t]==0 m[i][t] [i] m i t 0 t+=1 t 1 for j in range(s,t):
      wl[i][j]=t-s
     j range(s,t) range s t wl[i][j]=t-s wl[i][j] [i] wl i j t-s t s s=t+1 s t+1 t 1 t=t+1 t t+1 t 1 mx=0 mx 0 for i in range(w):
  s=0
  t=0
  while t<h:
    while t<h and m[t][i]==0:
      t+=1
    for j in range(s,t):
      k=wl[j][i]
      if mx<k+t-s:
        mx=k+t-s
    s=t+1
    t=t+1 i range(w) range w s=0 s 0 t=0 t 0 while t<h:
    while t<h and m[t][i]==0:
      t+=1
    for j in range(s,t):
      k=wl[j][i]
      if mx<k+t-s:
        mx=k+t-s
    s=t+1
    t=t+1 t<h t h while t<h and m[t][i]==0:
      t+=1
     t<h and m[t][i]==0 t<h t h m[t][i]==0 m[t][i] [t] m t i 0 t+=1 t 1 for j in range(s,t):
      k=wl[j][i]
      if mx<k+t-s:
        mx=k+t-s
     j range(s,t) range s t k=wl[j][i] k wl[j][i] [j] wl j i if mx<k+t-s:
        mx=k+t-s
     mx<k+t-s mx k+t-s k+t k t s mx=k+t-s mx k+t-s k+t k t s s=t+1 s t+1 t 1 t=t+1 t t+1 t 1 print(mx-1) print mx-1 mx 1 s=t+1 t+1 s t=t+1 t+1 t s=0 0 s t+=1 1 t k=wl[j][i] wl[j][i] k mx=0 0 mx t+=1 1 t wl=[[0 for i in range(w)]for j in range(h)] [[0 for i in range(w)]for j in range(h)] wl s=0 0 s t=0 0 t mx=k+t-s k+t-s mx w=list(map(int,input().split())) list(map(int,input().split())) w mm=[] [] mm t=0 0 t h,w=list(map(int,input().split())) list(map(int,input().split())) h t=t+1 t+1 t m=[] [] m s=t+1 t+1 s
h,w=list(map(int,input().split()))
m=[]
for i in range(h):
  mm=[]
  for j in input():
    mm.append(1 if j=="#" else 0)
  m.append(mm)

wl=[[0 for i in range(w)]for j in range(h)]
for i in range(h):
  s=0
  t=0
  while t<w:
    while t<w and m[i][t]==0:
      t+=1
    for j in range(s,t):
      wl[i][j]=t-s
    s=t+1
    t=t+1
mx=0
for i in range(w):
  s=0
  t=0
  while t<h:
    while t<h and m[t][i]==0:
      t+=1
    for j in range(s,t):
      k=wl[j][i]
      if mx<k+t-s:
        mx=k+t-s
    s=t+1
    t=t+1


print(mx-1)
