h,w=map(int,input().split())
l=list()
l.append('#'*(w+2))
for i in range(h):
    l.append("#"+input()+"#")
l.append('#'*(w+2))
si=[[0 for i in j] for j in l]
sj=[[0 for i in j] for j in l]
for i in range(h+2):
    k=0
    for j in range(w+2):
        if l[i][j]==".":
            k+=1
        else:
            for f in range(j-k,j):
                si[i][f]=k
            k=0
for j in range(w+2):
    k=0
    for i in range(h+2):
        if l[i][j]==".":
            k+=1
        else:
            for f in range(i-k,i):
                sj[f][j]=k
            k=0
ans=0
for i in range(h+2):
    for j in range(w+2):
        ans=max(ans,sj[i][j]+si[i][j])
print(ans-1) h,w=map(int,input().split()) h map(int,input().split()) map int input().split() ().split () input split w l=list() l list() list l.append('#'*(w+2)) l.append l append '#'*(w+2) '#' w+2 w 2 for i in range(h):
    l.append("#"+input()+"#") i range(h) range h l.append("#"+input()+"#") l.append l append "#"+input()+"#" "#"+input() "#" input() input "#" l.append('#'*(w+2)) l.append l append '#'*(w+2) '#' w+2 w 2 [0 for i in j] for j in l for j in l j l for j in l [0 for i in j] si=[[0 for i in j] for j in l] si [[0 for i in j] for j in l] [0 for i in j] for j in l for j in l j l for j in l [0 for i in j] sj=[[0 for i in j] for j in l] sj [[0 for i in j] for j in l] for i in range(h+2):
    k=0
    for j in range(w+2):
        if l[i][j]==".":
            k+=1
        else:
            for f in range(j-k,j):
                si[i][f]=k
            k=0 i range(h+2) range h+2 h 2 k=0 k 0 for j in range(w+2):
        if l[i][j]==".":
            k+=1
        else:
            for f in range(j-k,j):
                si[i][f]=k
            k=0 j range(w+2) range w+2 w 2 if l[i][j]==".":
            k+=1
        else:
            for f in range(j-k,j):
                si[i][f]=k
            k=0 l[i][j]=="." l[i][j] [i] l i j "." k+=1 k 1 for f in range(j-k,j):
                si[i][f]=k
             f range(j-k,j) range j-k j k j si[i][f]=k si[i][f] [i] si i f k k=0 k 0 for j in range(w+2):
    k=0
    for i in range(h+2):
        if l[i][j]==".":
            k+=1
        else:
            for f in range(i-k,i):
                sj[f][j]=k
            k=0 j range(w+2) range w+2 w 2 k=0 k 0 for i in range(h+2):
        if l[i][j]==".":
            k+=1
        else:
            for f in range(i-k,i):
                sj[f][j]=k
            k=0 i range(h+2) range h+2 h 2 if l[i][j]==".":
            k+=1
        else:
            for f in range(i-k,i):
                sj[f][j]=k
            k=0 l[i][j]=="." l[i][j] [i] l i j "." k+=1 k 1 for f in range(i-k,i):
                sj[f][j]=k
             f range(i-k,i) range i-k i k i sj[f][j]=k sj[f][j] [f] sj f j k k=0 k 0 ans=0 ans 0 for i in range(h+2):
    for j in range(w+2):
        ans=max(ans,sj[i][j]+si[i][j]) i range(h+2) range h+2 h 2 for j in range(w+2):
        ans=max(ans,sj[i][j]+si[i][j]) j range(w+2) range w+2 w 2 ans=max(ans,sj[i][j]+si[i][j]) ans max(ans,sj[i][j]+si[i][j]) max ans sj[i][j]+si[i][j] sj[i][j] [i] sj i j si[i][j] [i] si i j print(ans-1) print ans-1 ans 1 k=0 0 k ans=max(ans,sj[i][j]+si[i][j]) max(ans,sj[i][j]+si[i][j]) ans w=map(int,input().split()) map(int,input().split()) w ans=0 0 ans l=list() list() l k+=1 1 k k=0 0 k k=0 0 k sj=[[0 for i in j] for j in l] [[0 for i in j] for j in l] sj k+=1 1 k k=0 0 k si=[[0 for i in j] for j in l] [[0 for i in j] for j in l] si h,w=map(int,input().split()) map(int,input().split()) h
h,w=map(int,input().split())
l=list()
l.append('#'*(w+2))
for i in range(h):
    l.append("#"+input()+"#")
l.append('#'*(w+2))
si=[[0 for i in j] for j in l]
sj=[[0 for i in j] for j in l]
for i in range(h+2):
    k=0
    for j in range(w+2):
        if l[i][j]==".":
            k+=1
        else:
            for f in range(j-k,j):
                si[i][f]=k
            k=0
for j in range(w+2):
    k=0
    for i in range(h+2):
        if l[i][j]==".":
            k+=1
        else:
            for f in range(i-k,i):
                sj[f][j]=k
            k=0
ans=0
for i in range(h+2):
    for j in range(w+2):
        ans=max(ans,sj[i][j]+si[i][j])
print(ans-1)