h,w=map(int,input().split())
f=range
g=[[c=='.'for c in input()]for _ in f(h)]
a=[[-3]*w for _ in f(h)]
for i in f(h):
  l=r=0
  for j in f(w): l=-~l*g[i][j]; a[i][j]+=l; r=-~r*g[i][~j]; a[i][~j]+=r
for i in f(w):
  d=u=0
  for j in f(h): d=-~d*g[j][i]; a[j][i]+=d; u=-~u*g[~j][i]; a[~j][i]+=u
print(max(a[i][j] for i in f(h) for j in f(w))) h,w=map(int,input().split()) h map(int,input().split()) map int input().split() ().split () input split w f=range f range [c=='.'for c in input()]for _ in f(h) for _ in f(h) _ f(h) f h for _ in f(h) [c=='.'for c in input()] g=[[c=='.'for c in input()]for _ in f(h)] g [[c=='.'for c in input()]for _ in f(h)] [-3]*w for _ in f(h) for _ in f(h) _ f(h) f h for _ in f(h) [-3]*w [-3] -3 w a=[[-3]*w for _ in f(h)] a [[-3]*w for _ in f(h)] for i in f(h):
  l=r=0
  for j in f(w): l=-~l*g[i][j]; a[i][j]+=l; r=-~r*g[i][~j]; a[i][~j]+=r i f(h) f h l=r=0 l 0 =r=0 r 0 for j in f(w): l=-~l*g[i][j]; a[i][j]+=l; r=-~r*g[i][~j]; a[i][~j]+ j f(w) f w for i in f(w):
  d=u=0
  for j in f(h): d=-~d*g[j][i]; a[j][i]+=d; u=-~u*g[~j][i]; a[~j][i]+=u i f(w) f w d=u=0 d 0 =u=0 u 0 for j in f(h): d=-~d*g[j][i]; a[j][i]+=d; u=-~u*g[~j][i]; a[~j][i]+ j f(h) f h print(max(a[i][j] for i in f(h) for j in f(w))) print max(a[i][j] for i in f(h) for j in f(w)) max a[i][j] [i] a i j l=r=0 0 l d=u=0 0 d f=range range f r=0 0 r w=map(int,input().split()) map(int,input().split()) w g=[[c=='.'for c in input()]for _ in f(h)] [[c=='.'for c in input()]for _ in f(h)] g h,w=map(int,input().split()) map(int,input().split()) h a=[[-3]*w for _ in f(h)] [[-3]*w for _ in f(h)] a u=0 0 u
h,w=map(int,input().split())
f=range
g=[[c=='.'for c in input()]for _ in f(h)]
a=[[-3]*w for _ in f(h)]
for i in f(h):
  l=r=0
  for j in f(w): l=-~l*g[i][j]; a[i][j]+=l; r=-~r*g[i][~j]; a[i][~j]+=r
for i in f(w):
  d=u=0
  for j in f(h): d=-~d*g[j][i]; a[j][i]+=d; u=-~u*g[~j][i]; a[~j][i]+=u
print(max(a[i][j] for i in f(h) for j in f(w)))