import sys
input = sys.stdin.readline
H,W=map(int,input().split())
S=[[d for d in input()] for i in range(H)]
ans=[[0 for j in range(W)] for i in range(H)]
t=0
for i in range(H):
 p=0
 for j in range(W):
  if S[i][j]==".":
   p+=1
  else:
   p=0
  ans[i][j]+=p
for i in range(H):
 p=0
 for j in range(W)[::-1]:
  if S[i][j]==".":
   p+=1
  else:
   p=0
  ans[i][j]+=p
for j in range(W):
 p=0
 for i in range(H):
  if S[i][j]==".":
   p+=1
  else:
   p=0
  ans[i][j]+=p
for j in range(W):
 p=0
 for i in range(H)[::-1]:
  if S[i][j]==".":
   p+=1
  else:
   p=0
  ans[i][j]+=p
  t=max(t,ans[i][j])
print(t-3) import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline H,W=map(int,input().split()) H map(int,input().split()) map int input().split() ().split () input split W [d for d in input()] for i in range(H) for i in range(H) i range(H) range H for i in range(H) [d for d in input()] S=[[d for d in input()] for i in range(H)] S [[d for d in input()] for i in range(H)] [0 for j in range(W)] for i in range(H) for i in range(H) i range(H) range H for i in range(H) [0 for j in range(W)] ans=[[0 for j in range(W)] for i in range(H)] ans [[0 for j in range(W)] for i in range(H)] t=0 t 0 for i in range(H):
 p=0
 for j in range(W):
  if S[i][j]==".":
   p+=1
  else:
   p=0
  ans[i][j]+=p i range(H) range H p=0 p 0 for j in range(W):
  if S[i][j]==".":
   p+=1
  else:
   p=0
  ans[i][j]+=p j range(W) range W if S[i][j]==".":
   p+=1
  else:
   p=0
   S[i][j]=="." S[i][j] [i] S i j "." p+=1 p 1 p=0 p 0 ans[i][j]+=p ans[i][j] [i] ans i j p for i in range(H):
 p=0
 for j in range(W)[::-1]:
  if S[i][j]==".":
   p+=1
  else:
   p=0
  ans[i][j]+=p i range(H) range H p=0 p 0 for j in range(W)[::-1]:
  if S[i][j]==".":
   p+=1
  else:
   p=0
  ans[i][j]+=p j range(W)[::-1] (W) range W ::-1 -1 if S[i][j]==".":
   p+=1
  else:
   p=0
   S[i][j]=="." S[i][j] [i] S i j "." p+=1 p 1 p=0 p 0 ans[i][j]+=p ans[i][j] [i] ans i j p for j in range(W):
 p=0
 for i in range(H):
  if S[i][j]==".":
   p+=1
  else:
   p=0
  ans[i][j]+=p j range(W) range W p=0 p 0 for i in range(H):
  if S[i][j]==".":
   p+=1
  else:
   p=0
  ans[i][j]+=p i range(H) range H if S[i][j]==".":
   p+=1
  else:
   p=0
   S[i][j]=="." S[i][j] [i] S i j "." p+=1 p 1 p=0 p 0 ans[i][j]+=p ans[i][j] [i] ans i j p for j in range(W):
 p=0
 for i in range(H)[::-1]:
  if S[i][j]==".":
   p+=1
  else:
   p=0
  ans[i][j]+=p
  t=max(t,ans[i][j]) j range(W) range W p=0 p 0 for i in range(H)[::-1]:
  if S[i][j]==".":
   p+=1
  else:
   p=0
  ans[i][j]+=p
  t=max(t,ans[i][j]) i range(H)[::-1] (H) range H ::-1 -1 if S[i][j]==".":
   p+=1
  else:
   p=0
   S[i][j]=="." S[i][j] [i] S i j "." p+=1 p 1 p=0 p 0 ans[i][j]+=p ans[i][j] [i] ans i j p t=max(t,ans[i][j]) t max(t,ans[i][j]) max t ans[i][j] [i] ans i j print(t-3) print t-3 t 3 W=map(int,input().split()) map(int,input().split()) W input = sys.stdin.readline sys.stdin.readline input p=0 0 p p+=1 1 p ans=[[0 for j in range(W)] for i in range(H)] [[0 for j in range(W)] for i in range(H)] ans p=0 0 p p+=1 1 p p=0 0 p p=0 0 p p+=1 1 p p+=1 1 p H,W=map(int,input().split()) map(int,input().split()) H p=0 0 p p=0 0 p p=0 0 p S=[[d for d in input()] for i in range(H)] [[d for d in input()] for i in range(H)] S p=0 0 p t=0 0 t t=max(t,ans[i][j]) max(t,ans[i][j]) t
import sys
input = sys.stdin.readline
H,W=map(int,input().split())
S=[[d for d in input()] for i in range(H)]
ans=[[0 for j in range(W)] for i in range(H)]
t=0
for i in range(H):
 p=0
 for j in range(W):
  if S[i][j]==".":
   p+=1
  else:
   p=0
  ans[i][j]+=p
for i in range(H):
 p=0
 for j in range(W)[::-1]:
  if S[i][j]==".":
   p+=1
  else:
   p=0
  ans[i][j]+=p
for j in range(W):
 p=0
 for i in range(H):
  if S[i][j]==".":
   p+=1
  else:
   p=0
  ans[i][j]+=p
for j in range(W):
 p=0
 for i in range(H)[::-1]:
  if S[i][j]==".":
   p+=1
  else:
   p=0
  ans[i][j]+=p
  t=max(t,ans[i][j])
print(t-3)