h,w=map(int,input().split())
S=[]
for i in range(h):
    S.append(input())

tab=[[0 for i in range(w)] for q in range(h)]

cnt=0
for i in range(h):
    cnt=0
    for q in range(w):
        if S[i][q]==".":
            cnt+=1
        else:
            cnt=0
        tab[i][q]+=cnt



cnt=0
for i in range(h):
    cnt=0
    for q in range(w-1,-1,-1):
        if S[i][q]==".":
            cnt+=1
        else:
            cnt=0
        tab[i][q]+=cnt



cnt=0
for q in range(w):
    cnt=0
    for i in range(h):
        if S[i][q]==".":
            cnt+=1
        else:
            cnt=0
        tab[i][q]+=cnt



cnt=0
for q in range(w):
    cnt=0
    for i in range(h-1,-1,-1):
        if S[i][q]==".":
            cnt+=1
        else:
            cnt=0
        tab[i][q]+=cnt

print(max([max(col) for col in tab])-3)
 h,w=map(int,input().split()) h map(int,input().split()) map int input().split() ().split () input split w S=[] S [] for i in range(h):
    S.append(input()) i range(h) range h S.append(input()) S.append S append input() input [0 for i in range(w)] for q in range(h) for q in range(h) q range(h) range h for q in range(h) [0 for i in range(w)] tab=[[0 for i in range(w)] for q in range(h)] tab [[0 for i in range(w)] for q in range(h)] cnt=0 cnt 0 for i in range(h):
    cnt=0
    for q in range(w):
        if S[i][q]==".":
            cnt+=1
        else:
            cnt=0
        tab[i][q]+=cnt i range(h) range h cnt=0 cnt 0 for q in range(w):
        if S[i][q]==".":
            cnt+=1
        else:
            cnt=0
        tab[i][q]+=cnt q range(w) range w if S[i][q]==".":
            cnt+=1
        else:
            cnt=0
         S[i][q]=="." S[i][q] [i] S i q "." cnt+=1 cnt 1 cnt=0 cnt 0 tab[i][q]+=cnt tab[i][q] [i] tab i q cnt cnt=0 cnt 0 for i in range(h):
    cnt=0
    for q in range(w-1,-1,-1):
        if S[i][q]==".":
            cnt+=1
        else:
            cnt=0
        tab[i][q]+=cnt i range(h) range h cnt=0 cnt 0 for q in range(w-1,-1,-1):
        if S[i][q]==".":
            cnt+=1
        else:
            cnt=0
        tab[i][q]+=cnt q range(w-1,-1,-1) range w-1 w 1 -1 -1 if S[i][q]==".":
            cnt+=1
        else:
            cnt=0
         S[i][q]=="." S[i][q] [i] S i q "." cnt+=1 cnt 1 cnt=0 cnt 0 tab[i][q]+=cnt tab[i][q] [i] tab i q cnt cnt=0 cnt 0 for q in range(w):
    cnt=0
    for i in range(h):
        if S[i][q]==".":
            cnt+=1
        else:
            cnt=0
        tab[i][q]+=cnt q range(w) range w cnt=0 cnt 0 for i in range(h):
        if S[i][q]==".":
            cnt+=1
        else:
            cnt=0
        tab[i][q]+=cnt i range(h) range h if S[i][q]==".":
            cnt+=1
        else:
            cnt=0
         S[i][q]=="." S[i][q] [i] S i q "." cnt+=1 cnt 1 cnt=0 cnt 0 tab[i][q]+=cnt tab[i][q] [i] tab i q cnt cnt=0 cnt 0 for q in range(w):
    cnt=0
    for i in range(h-1,-1,-1):
        if S[i][q]==".":
            cnt+=1
        else:
            cnt=0
        tab[i][q]+=cnt q range(w) range w cnt=0 cnt 0 for i in range(h-1,-1,-1):
        if S[i][q]==".":
            cnt+=1
        else:
            cnt=0
        tab[i][q]+=cnt i range(h-1,-1,-1) range h-1 h 1 -1 -1 if S[i][q]==".":
            cnt+=1
        else:
            cnt=0
         S[i][q]=="." S[i][q] [i] S i q "." cnt+=1 cnt 1 cnt=0 cnt 0 tab[i][q]+=cnt tab[i][q] [i] tab i q cnt max(col) for col in tab for col in tab col tab for col in tab max(col) max col print(max([max(col) for col in tab])-3) print max([max(col) for col in tab])-3 max([max(col) for col in tab]) max [max(col) for col in tab] 3 cnt=0 0 cnt h,w=map(int,input().split()) map(int,input().split()) h tab=[[0 for i in range(w)] for q in range(h)] [[0 for i in range(w)] for q in range(h)] tab cnt=0 0 cnt cnt+=1 1 cnt cnt=0 0 cnt cnt=0 0 cnt cnt+=1 1 cnt cnt=0 0 cnt cnt=0 0 cnt cnt=0 0 cnt cnt+=1 1 cnt w=map(int,input().split()) map(int,input().split()) w S=[] [] S cnt=0 0 cnt cnt=0 0 cnt cnt=0 0 cnt cnt=0 0 cnt cnt=0 0 cnt cnt+=1 1 cnt
h,w=map(int,input().split())
S=[]
for i in range(h):
    S.append(input())

tab=[[0 for i in range(w)] for q in range(h)]

cnt=0
for i in range(h):
    cnt=0
    for q in range(w):
        if S[i][q]==".":
            cnt+=1
        else:
            cnt=0
        tab[i][q]+=cnt



cnt=0
for i in range(h):
    cnt=0
    for q in range(w-1,-1,-1):
        if S[i][q]==".":
            cnt+=1
        else:
            cnt=0
        tab[i][q]+=cnt



cnt=0
for q in range(w):
    cnt=0
    for i in range(h):
        if S[i][q]==".":
            cnt+=1
        else:
            cnt=0
        tab[i][q]+=cnt



cnt=0
for q in range(w):
    cnt=0
    for i in range(h-1,-1,-1):
        if S[i][q]==".":
            cnt+=1
        else:
            cnt=0
        tab[i][q]+=cnt

print(max([max(col) for col in tab])-3)

