h,w=map(lambda x:range(int(x)),input().split())
g=[[c=='.'for c in input()]for _ in h]
a=[[-3]*len(w)for _ in h]
for i in h:
  l=r=0
  for j in w: l=-~l*g[i][j]; a[i][j]+=l; r=-~r*g[i][~j]; a[i][~j]+=r
for i in w:
  d=u=0
  for j in 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 h for j in w)) h,w=map(lambda x:range(int(x)),input().split()) h map(lambda x:range(int(x)),input().split()) map lambda x:range(int(x)) range(int(x)) range int(x) int x x input().split() ().split () input split w [c=='.'for c in input()]for _ in h for _ in h _ h for _ in h [c=='.'for c in input()] g=[[c=='.'for c in input()]for _ in h] g [[c=='.'for c in input()]for _ in h] [-3]*len(w)for _ in h for _ in h _ h for _ in h [-3]*len(w) [-3] -3 len(w) len w a=[[-3]*len(w)for _ in h] a [[-3]*len(w)for _ in h] for i in h:
  l=r=0
  for j in w: l=-~l*g[i][j]; a[i][j]+=l; r=-~r*g[i][~j]; a[i][~j]+=r i h l=r=0 l 0 =r=0 r 0 for j in w: l=-~l*g[i][j]; a[i][j]+=l; r=-~r*g[i][~j]; a[i][~j]+ j w for i in w:
  d=u=0
  for j in h: d=-~d*g[j][i]; a[j][i]+=d; u=-~u*g[~j][i]; a[~j][i]+=u i w d=u=0 d 0 =u=0 u 0 for j in h: d=-~d*g[j][i]; a[j][i]+=d; u=-~u*g[~j][i]; a[~j][i]+ j h print(max(a[i][j] for i in h for j in w)) print max(a[i][j] for i in h for j in w) max a[i][j] [i] a i j d=u=0 0 d w=map(lambda x:range(int(x)),input().split()) map(lambda x:range(int(x)),input().split()) w u=0 0 u a=[[-3]*len(w)for _ in h] [[-3]*len(w)for _ in h] a r=0 0 r g=[[c=='.'for c in input()]for _ in h] [[c=='.'for c in input()]for _ in h] g h,w=map(lambda x:range(int(x)),input().split()) map(lambda x:range(int(x)),input().split()) h l=r=0 0 l
h,w=map(lambda x:range(int(x)),input().split())
g=[[c=='.'for c in input()]for _ in h]
a=[[-3]*len(w)for _ in h]
for i in h:
  l=r=0
  for j in w: l=-~l*g[i][j]; a[i][j]+=l; r=-~r*g[i][~j]; a[i][~j]+=r
for i in w:
  d=u=0
  for j in 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 h for j in w))