h,w=map(int,input().split())
field=[list(input()) for i in range(h)]

l=[[0]*w for i in range(h)]
r=[[0]*w for i in range(h)]
u=[[0]*w for i in range(h)]
d=[[0]*w for i in range(h)]

for i in range(h):
    for j in range(w):
        if field[i][j]=="#":
            l[i][j]=0
        elif j==0:
            l[i][j]=1
        else:
            l[i][j]=l[i][j-1]+1

for i in range(h):
    for j in reversed(range(w)):
        if field[i][j]=="#":
            r[i][j]=0
        elif j==w-1:
            r[i][j]=1
        else:
            r[i][j]=r[i][j+1]+1

for i in range(h):
    for j in range(w):
        if field[i][j]=="#":
            u[i][j]=0
        elif i==0:
            u[i][j]=1
        else:
            u[i][j]=u[i-1][j]+1

for i in reversed(range(h)):
    for j in range(w):
        if field[i][j]=="#":
            d[i][j]=0
        elif i==h-1:
            d[i][j]=1
        else:
            d[i][j]=d[i+1][j]+1

ans=0
for i in range(h):
    for j in range(w):
        tmp=l[i][j]+r[i][j]+u[i][j]+d[i][j]-3
        ans=max(ans,tmp)
print(ans) h,w=map(int,input().split()) h map(int,input().split()) map int input().split() ().split () input split w list(input()) for i in range(h) for i in range(h) i range(h) range h for i in range(h) list(input()) list input() input field=[list(input()) for i in range(h)] field [list(input()) for i in range(h)] [0]*w for i in range(h) for i in range(h) i range(h) range h for i in range(h) [0]*w [0] 0 w l=[[0]*w for i in range(h)] l [[0]*w for i in range(h)] [0]*w for i in range(h) for i in range(h) i range(h) range h for i in range(h) [0]*w [0] 0 w r=[[0]*w for i in range(h)] r [[0]*w for i in range(h)] [0]*w for i in range(h) for i in range(h) i range(h) range h for i in range(h) [0]*w [0] 0 w u=[[0]*w for i in range(h)] u [[0]*w for i in range(h)] [0]*w for i in range(h) for i in range(h) i range(h) range h for i in range(h) [0]*w [0] 0 w d=[[0]*w for i in range(h)] d [[0]*w for i in range(h)] for i in range(h):
    for j in range(w):
        if field[i][j]=="#":
            l[i][j]=0
        elif j==0:
            l[i][j]=1
        else:
            l[i][j]=l[i][j-1]+1 i range(h) range h for j in range(w):
        if field[i][j]=="#":
            l[i][j]=0
        elif j==0:
            l[i][j]=1
        else:
            l[i][j]=l[i][j-1]+1 j range(w) range w if field[i][j]=="#":
            l[i][j]=0
        elif j==0:
            l[i][j]=1
        else:
            l[i][j]=l[i][j-1]+1 field[i][j]=="#" field[i][j] [i] field i j "#" l[i][j]=0 l[i][j] [i] l i j 0 elif j==0:
            l[i][j]=1
         j==0 j 0 l[i][j]=1 l[i][j] [i] l i j 1 l[i][j]=l[i][j-1]+1 l[i][j] [i] l i j l[i][j-1]+1 l[i][j-1] [i] l i j-1 j 1 1 for i in range(h):
    for j in reversed(range(w)):
        if field[i][j]=="#":
            r[i][j]=0
        elif j==w-1:
            r[i][j]=1
        else:
            r[i][j]=r[i][j+1]+1 i range(h) range h for j in reversed(range(w)):
        if field[i][j]=="#":
            r[i][j]=0
        elif j==w-1:
            r[i][j]=1
        else:
            r[i][j]=r[i][j+1]+1 j reversed(range(w)) reversed range(w) range w if field[i][j]=="#":
            r[i][j]=0
        elif j==w-1:
            r[i][j]=1
        else:
            r[i][j]=r[i][j+1]+1 field[i][j]=="#" field[i][j] [i] field i j "#" r[i][j]=0 r[i][j] [i] r i j 0 elif j==w-1:
            r[i][j]=1
         j==w-1 j w-1 w 1 r[i][j]=1 r[i][j] [i] r i j 1 r[i][j]=r[i][j+1]+1 r[i][j] [i] r i j r[i][j+1]+1 r[i][j+1] [i] r i j+1 j 1 1 for i in range(h):
    for j in range(w):
        if field[i][j]=="#":
            u[i][j]=0
        elif i==0:
            u[i][j]=1
        else:
            u[i][j]=u[i-1][j]+1 i range(h) range h for j in range(w):
        if field[i][j]=="#":
            u[i][j]=0
        elif i==0:
            u[i][j]=1
        else:
            u[i][j]=u[i-1][j]+1 j range(w) range w if field[i][j]=="#":
            u[i][j]=0
        elif i==0:
            u[i][j]=1
        else:
            u[i][j]=u[i-1][j]+1 field[i][j]=="#" field[i][j] [i] field i j "#" u[i][j]=0 u[i][j] [i] u i j 0 elif i==0:
            u[i][j]=1
         i==0 i 0 u[i][j]=1 u[i][j] [i] u i j 1 u[i][j]=u[i-1][j]+1 u[i][j] [i] u i j u[i-1][j]+1 u[i-1][j] [i-1] u i-1 i 1 j 1 for i in reversed(range(h)):
    for j in range(w):
        if field[i][j]=="#":
            d[i][j]=0
        elif i==h-1:
            d[i][j]=1
        else:
            d[i][j]=d[i+1][j]+1 i reversed(range(h)) reversed range(h) range h for j in range(w):
        if field[i][j]=="#":
            d[i][j]=0
        elif i==h-1:
            d[i][j]=1
        else:
            d[i][j]=d[i+1][j]+1 j range(w) range w if field[i][j]=="#":
            d[i][j]=0
        elif i==h-1:
            d[i][j]=1
        else:
            d[i][j]=d[i+1][j]+1 field[i][j]=="#" field[i][j] [i] field i j "#" d[i][j]=0 d[i][j] [i] d i j 0 elif i==h-1:
            d[i][j]=1
         i==h-1 i h-1 h 1 d[i][j]=1 d[i][j] [i] d i j 1 d[i][j]=d[i+1][j]+1 d[i][j] [i] d i j d[i+1][j]+1 d[i+1][j] [i+1] d i+1 i 1 j 1 ans=0 ans 0 for i in range(h):
    for j in range(w):
        tmp=l[i][j]+r[i][j]+u[i][j]+d[i][j]-3
        ans=max(ans,tmp) i range(h) range h for j in range(w):
        tmp=l[i][j]+r[i][j]+u[i][j]+d[i][j]-3
        ans=max(ans,tmp) j range(w) range w tmp=l[i][j]+r[i][j]+u[i][j]+d[i][j]-3 tmp l[i][j]+r[i][j]+u[i][j]+d[i][j]-3 l[i][j]+r[i][j]+u[i][j]+d[i][j] l[i][j]+r[i][j]+u[i][j] l[i][j]+r[i][j] l[i][j] [i] l i j r[i][j] [i] r i j u[i][j] [i] u i j d[i][j] [i] d i j 3 ans=max(ans,tmp) ans max(ans,tmp) max ans tmp print(ans) print ans l=[[0]*w for i in range(h)] [[0]*w for i in range(h)] l r=[[0]*w for i in range(h)] [[0]*w for i in range(h)] r ans=0 0 ans h,w=map(int,input().split()) map(int,input().split()) h w=map(int,input().split()) map(int,input().split()) w field=[list(input()) for i in range(h)] [list(input()) for i in range(h)] field tmp=l[i][j]+r[i][j]+u[i][j]+d[i][j]-3 l[i][j]+r[i][j]+u[i][j]+d[i][j]-3 tmp u=[[0]*w for i in range(h)] [[0]*w for i in range(h)] u ans=max(ans,tmp) max(ans,tmp) ans d=[[0]*w for i in range(h)] [[0]*w for i in range(h)] d
h,w=map(int,input().split())
field=[list(input()) for i in range(h)]

l=[[0]*w for i in range(h)]
r=[[0]*w for i in range(h)]
u=[[0]*w for i in range(h)]
d=[[0]*w for i in range(h)]

for i in range(h):
    for j in range(w):
        if field[i][j]=="#":
            l[i][j]=0
        elif j==0:
            l[i][j]=1
        else:
            l[i][j]=l[i][j-1]+1

for i in range(h):
    for j in reversed(range(w)):
        if field[i][j]=="#":
            r[i][j]=0
        elif j==w-1:
            r[i][j]=1
        else:
            r[i][j]=r[i][j+1]+1

for i in range(h):
    for j in range(w):
        if field[i][j]=="#":
            u[i][j]=0
        elif i==0:
            u[i][j]=1
        else:
            u[i][j]=u[i-1][j]+1

for i in reversed(range(h)):
    for j in range(w):
        if field[i][j]=="#":
            d[i][j]=0
        elif i==h-1:
            d[i][j]=1
        else:
            d[i][j]=d[i+1][j]+1

ans=0
for i in range(h):
    for j in range(w):
        tmp=l[i][j]+r[i][j]+u[i][j]+d[i][j]-3
        ans=max(ans,tmp)
print(ans)
