# ABC129 D

H,W=map(int,input().split())
S=[input() for _ in [0]*H]
Lx=[[0]*W for _ in [0]*H]
Ly=[[0]*W for _ in [0]*H]

def search_x(x,y):
    i=x
    while 1:
        i+=1
        if i<W:
            if S[y][i]=='#':
                break
        else:
            break
    return i-x

def search_y(x,y):
    j=y
    while 1:
        j+=1
        if j<H:
            if S[j][x]=='#':
                break
        else:
            break
    return j-y

def set_x(x,y,p):
    i=x
    Lx[y][i]=p
    while 1:
        i+=1
        if i<W:
            if S[y][i]=='#':
                break
            else:
                Lx[y][i]=p
        else:
            break

def set_y(x,y,p):
    j=y
    Ly[j][x]=p
    while 1:
        j+=1
        if j<H:
            if S[j][x]=='#':
                break
            else:
                Ly[j][x]=p
        else:
            break

res=0
for y in range(H):
    for x in range(W):
        if S[y][x]=='.':
            if Lx[y][x]==0:
                w=search_x(x,y)
                set_x(x,y,w)
            if Ly[y][x]==0:
                Ly[y][x]==0
                h=search_y(x,y)
                set_y(x,y,h)
            res=max(Lx[y][x]+Ly[y][x]-1,res)
print(res) H,W=map(int,input().split()) H map(int,input().split()) map int input().split() ().split () input split W input() for _ in [0]*H for _ in [0]*H _ [0]*H [0] 0 H for _ in [0]*H input() input S=[input() for _ in [0]*H] S [input() for _ in [0]*H] [0]*W for _ in [0]*H for _ in [0]*H _ [0]*H [0] 0 H for _ in [0]*H [0]*W [0] 0 W Lx=[[0]*W for _ in [0]*H] Lx [[0]*W for _ in [0]*H] [0]*W for _ in [0]*H for _ in [0]*H _ [0]*H [0] 0 H for _ in [0]*H [0]*W [0] 0 W Ly=[[0]*W for _ in [0]*H] Ly [[0]*W for _ in [0]*H] def search_x(x,y):
    i=x
    while 1:
        i+=1
        if i<W:
            if S[y][i]=='#':
                break
        else:
            break
    return i-x search_x i=x i x while 1:
        i+=1
        if i<W:
            if S[y][i]=='#':
                break
        else:
            break
     1 i+=1 i 1 if i<W:
            if S[y][i]=='#':
                break
        else:
            break
     i<W i W if S[y][i]=='#':
                break
         S[y][i]=='#' S[y][i] [y] S y i '#' break break return i-x i-x i x x x y y def search_y(x,y):
    j=y
    while 1:
        j+=1
        if j<H:
            if S[j][x]=='#':
                break
        else:
            break
    return j-y search_y j=y j y while 1:
        j+=1
        if j<H:
            if S[j][x]=='#':
                break
        else:
            break
     1 j+=1 j 1 if j<H:
            if S[j][x]=='#':
                break
        else:
            break
     j<H j H if S[j][x]=='#':
                break
         S[j][x]=='#' S[j][x] [j] S j x '#' break break return j-y j-y j y x x y y def set_x(x,y,p):
    i=x
    Lx[y][i]=p
    while 1:
        i+=1
        if i<W:
            if S[y][i]=='#':
                break
            else:
                Lx[y][i]=p
        else:
            break set_x i=x i x Lx[y][i]=p Lx[y][i] [y] Lx y i p while 1:
        i+=1
        if i<W:
            if S[y][i]=='#':
                break
            else:
                Lx[y][i]=p
        else:
            break 1 i+=1 i 1 if i<W:
            if S[y][i]=='#':
                break
            else:
                Lx[y][i]=p
        else:
            break i<W i W if S[y][i]=='#':
                break
            else:
                Lx[y][i]=p
         S[y][i]=='#' S[y][i] [y] S y i '#' break Lx[y][i]=p Lx[y][i] [y] Lx y i p break x x y y p p def set_y(x,y,p):
    j=y
    Ly[j][x]=p
    while 1:
        j+=1
        if j<H:
            if S[j][x]=='#':
                break
            else:
                Ly[j][x]=p
        else:
            break set_y j=y j y Ly[j][x]=p Ly[j][x] [j] Ly j x p while 1:
        j+=1
        if j<H:
            if S[j][x]=='#':
                break
            else:
                Ly[j][x]=p
        else:
            break 1 j+=1 j 1 if j<H:
            if S[j][x]=='#':
                break
            else:
                Ly[j][x]=p
        else:
            break j<H j H if S[j][x]=='#':
                break
            else:
                Ly[j][x]=p
         S[j][x]=='#' S[j][x] [j] S j x '#' break Ly[j][x]=p Ly[j][x] [j] Ly j x p break x x y y p p res=0 res 0 for y in range(H):
    for x in range(W):
        if S[y][x]=='.':
            if Lx[y][x]==0:
                w=search_x(x,y)
                set_x(x,y,w)
            if Ly[y][x]==0:
                Ly[y][x]==0
                h=search_y(x,y)
                set_y(x,y,h)
            res=max(Lx[y][x]+Ly[y][x]-1,res) y range(H) range H for x in range(W):
        if S[y][x]=='.':
            if Lx[y][x]==0:
                w=search_x(x,y)
                set_x(x,y,w)
            if Ly[y][x]==0:
                Ly[y][x]==0
                h=search_y(x,y)
                set_y(x,y,h)
            res=max(Lx[y][x]+Ly[y][x]-1,res) x range(W) range W if S[y][x]=='.':
            if Lx[y][x]==0:
                w=search_x(x,y)
                set_x(x,y,w)
            if Ly[y][x]==0:
                Ly[y][x]==0
                h=search_y(x,y)
                set_y(x,y,h)
            res=max(Lx[y][x]+Ly[y][x]-1,res) S[y][x]=='.' S[y][x] [y] S y x '.' if Lx[y][x]==0:
                w=search_x(x,y)
                set_x(x,y,w)
             Lx[y][x]==0 Lx[y][x] [y] Lx y x 0 w=search_x(x,y) w search_x(x,y) search_x x y set_x(x,y,w) set_x x y w if Ly[y][x]==0:
                Ly[y][x]==0
                h=search_y(x,y)
                set_y(x,y,h)
             Ly[y][x]==0 Ly[y][x] [y] Ly y x 0 Ly[y][x]==0 Ly[y][x] [y] Ly y x 0 h=search_y(x,y) h search_y(x,y) search_y x y set_y(x,y,h) set_y x y h res=max(Lx[y][x]+Ly[y][x]-1,res) res max(Lx[y][x]+Ly[y][x]-1,res) max Lx[y][x]+Ly[y][x]-1 Lx[y][x]+Ly[y][x] Lx[y][x] [y] Lx y x Ly[y][x] [y] Ly y x 1 res print(res) print res res=0 0 res H,W=map(int,input().split()) map(int,input().split()) H W=map(int,input().split()) map(int,input().split()) W def set_y(x,y,p):
    j=y
    Ly[j][x]=p
    while 1:
        j+=1
        if j<H:
            if S[j][x]=='#':
                break
            else:
                Ly[j][x]=p
        else:
            break def set_y(x,y,p):
    j=y
    Ly[j][x]=p
    while 1:
        j+=1
        if j<H:
            if S[j][x]=='#':
                break
            else:
                Ly[j][x]=p
        else:
            break set_y Lx=[[0]*W for _ in [0]*H] [[0]*W for _ in [0]*H] Lx h=search_y(x,y) search_y(x,y) h res=max(Lx[y][x]+Ly[y][x]-1,res) max(Lx[y][x]+Ly[y][x]-1,res) res Ly=[[0]*W for _ in [0]*H] [[0]*W for _ in [0]*H] Ly w=search_x(x,y) search_x(x,y) w def search_y(x,y):
    j=y
    while 1:
        j+=1
        if j<H:
            if S[j][x]=='#':
                break
        else:
            break
    return j-y def search_y(x,y):
    j=y
    while 1:
        j+=1
        if j<H:
            if S[j][x]=='#':
                break
        else:
            break
    return j-y search_y S=[input() for _ in [0]*H] [input() for _ in [0]*H] S def set_x(x,y,p):
    i=x
    Lx[y][i]=p
    while 1:
        i+=1
        if i<W:
            if S[y][i]=='#':
                break
            else:
                Lx[y][i]=p
        else:
            break def set_x(x,y,p):
    i=x
    Lx[y][i]=p
    while 1:
        i+=1
        if i<W:
            if S[y][i]=='#':
                break
            else:
                Lx[y][i]=p
        else:
            break set_x def search_x(x,y):
    i=x
    while 1:
        i+=1
        if i<W:
            if S[y][i]=='#':
                break
        else:
            break
    return i-x def search_x(x,y):
    i=x
    while 1:
        i+=1
        if i<W:
            if S[y][i]=='#':
                break
        else:
            break
    return i-x search_x
# ABC129 D

H,W=map(int,input().split())
S=[input() for _ in [0]*H]
Lx=[[0]*W for _ in [0]*H]
Ly=[[0]*W for _ in [0]*H]

def search_x(x,y):
    i=x
    while 1:
        i+=1
        if i<W:
            if S[y][i]=='#':
                break
        else:
            break
    return i-x

def search_y(x,y):
    j=y
    while 1:
        j+=1
        if j<H:
            if S[j][x]=='#':
                break
        else:
            break
    return j-y

def set_x(x,y,p):
    i=x
    Lx[y][i]=p
    while 1:
        i+=1
        if i<W:
            if S[y][i]=='#':
                break
            else:
                Lx[y][i]=p
        else:
            break

def set_y(x,y,p):
    j=y
    Ly[j][x]=p
    while 1:
        j+=1
        if j<H:
            if S[j][x]=='#':
                break
            else:
                Ly[j][x]=p
        else:
            break

res=0
for y in range(H):
    for x in range(W):
        if S[y][x]=='.':
            if Lx[y][x]==0:
                w=search_x(x,y)
                set_x(x,y,w)
            if Ly[y][x]==0:
                Ly[y][x]==0
                h=search_y(x,y)
                set_y(x,y,h)
            res=max(Lx[y][x]+Ly[y][x]-1,res)
print(res)