import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    H,W=MI()
    S=[]
    S.append(["#"]*(W+2))
    for i in range(H):
        s=["#"]+list(input())+["#"]
        S.append(s)
    S.append(["#"]*(W+2))
    
    L=[[-1]*(W+2) for _ in range(H+2)]
    R=[[-1]*(W+2) for _ in range(H+2)]
    U=[[-1]*(W+2) for _ in range(H+2)]
    D=[[-1]*(W+2) for _ in range(H+2)]
    
    for i in range(1,H+1):
        for j in range(1,W+1):
            if S[i][j]!="#":
                L[i][j]=L[i][j-1]+1
                U[i][j]=U[i-1][j]+1
                
    for i in range(H,0,-1):
        for j in range(W,0,-1):
            if S[i][j]!="#":
                R[i][j]=R[i][j+1]+1
                D[i][j]=D[i+1][j]+1
                
    ans=0
    
    for i in range(H+2):
        for j in range(W+2):
            if S[i][j]!="#":
                temp=L[i][j]+R[i][j]+U[i][j]+D[i][j]+1
                ans=max(ans,temp)
                
    # for i in range(H+2):
    #     print(L[i])
    # for i in range(H+2):
    #     print(R[i])
    # for i in range(H+2):
    #     print(U[i])
    # for i in range(H+2):
    #     print(D[i])
                
    print(ans)

main() import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline def I(): return int(input()) I def MI(): return map(int, input().split()) MI def LI(): return list(map(int, input().split())) LI def main():
    mod=10**9+7
    H,W=MI()
    S=[]
    S.append(["#"]*(W+2))
    for i in range(H):
        s=["#"]+list(input())+["#"]
        S.append(s)
    S.append(["#"]*(W+2))
    
    L=[[-1]*(W+2) for _ in range(H+2)]
    R=[[-1]*(W+2) for _ in range(H+2)]
    U=[[-1]*(W+2) for _ in range(H+2)]
    D=[[-1]*(W+2) for _ in range(H+2)]
    
    for i in range(1,H+1):
        for j in range(1,W+1):
            if S[i][j]!="#":
                L[i][j]=L[i][j-1]+1
                U[i][j]=U[i-1][j]+1
                
    for i in range(H,0,-1):
        for j in range(W,0,-1):
            if S[i][j]!="#":
                R[i][j]=R[i][j+1]+1
                D[i][j]=D[i+1][j]+1
                
    ans=0
    
    for i in range(H+2):
        for j in range(W+2):
            if S[i][j]!="#":
                temp=L[i][j]+R[i][j]+U[i][j]+D[i][j]+1
                ans=max(ans,temp)
                
    # for i in range(H+2):
    #     print(L[i])
    # for i in range(H+2):
    #     print(R[i])
    # for i in range(H+2):
    #     print(U[i])
    # for i in range(H+2):
    #     print(D[i])
                
    print(ans) main mod=10**9+7 mod 10**9+7 10**9 10 9 7 H,W=MI() H MI() MI W S=[] S [] S.append(["#"]*(W+2)) S.append S append ["#"]*(W+2) ["#"] "#" W+2 W 2 for i in range(H):
        s=["#"]+list(input())+["#"]
        S.append(s)
     i range(H) range H s=["#"]+list(input())+["#"] s ["#"]+list(input())+["#"] ["#"]+list(input()) ["#"] "#" list(input()) list input() input ["#"] "#" S.append(s) S.append S append s S.append(["#"]*(W+2)) S.append S append ["#"]*(W+2) ["#"] "#" W+2 W 2 [-1]*(W+2) for _ in range(H+2) for _ in range(H+2) _ range(H+2) range H+2 H 2 for _ in range(H+2) [-1]*(W+2) [-1] -1 W+2 W 2 L=[[-1]*(W+2) for _ in range(H+2)] L [[-1]*(W+2) for _ in range(H+2)] [-1]*(W+2) for _ in range(H+2) for _ in range(H+2) _ range(H+2) range H+2 H 2 for _ in range(H+2) [-1]*(W+2) [-1] -1 W+2 W 2 R=[[-1]*(W+2) for _ in range(H+2)] R [[-1]*(W+2) for _ in range(H+2)] [-1]*(W+2) for _ in range(H+2) for _ in range(H+2) _ range(H+2) range H+2 H 2 for _ in range(H+2) [-1]*(W+2) [-1] -1 W+2 W 2 U=[[-1]*(W+2) for _ in range(H+2)] U [[-1]*(W+2) for _ in range(H+2)] [-1]*(W+2) for _ in range(H+2) for _ in range(H+2) _ range(H+2) range H+2 H 2 for _ in range(H+2) [-1]*(W+2) [-1] -1 W+2 W 2 D=[[-1]*(W+2) for _ in range(H+2)] D [[-1]*(W+2) for _ in range(H+2)] for i in range(1,H+1):
        for j in range(1,W+1):
            if S[i][j]!="#":
                L[i][j]=L[i][j-1]+1
                U[i][j]=U[i-1][j]+1
                
     i range(1,H+1) range 1 H+1 H 1 for j in range(1,W+1):
            if S[i][j]!="#":
                L[i][j]=L[i][j-1]+1
                U[i][j]=U[i-1][j]+1
                
     j range(1,W+1) range 1 W+1 W 1 if S[i][j]!="#":
                L[i][j]=L[i][j-1]+1
                U[i][j]=U[i-1][j]+1
                
     S[i][j]!="#" S[i][j] [i] S i j "#" 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 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 range(H,0,-1):
        for j in range(W,0,-1):
            if S[i][j]!="#":
                R[i][j]=R[i][j+1]+1
                D[i][j]=D[i+1][j]+1
                
     i range(H,0,-1) range H 0 -1 for j in range(W,0,-1):
            if S[i][j]!="#":
                R[i][j]=R[i][j+1]+1
                D[i][j]=D[i+1][j]+1
                
     j range(W,0,-1) range W 0 -1 if S[i][j]!="#":
                R[i][j]=R[i][j+1]+1
                D[i][j]=D[i+1][j]+1
                
     S[i][j]!="#" S[i][j] [i] S i j "#" 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 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+2):
        for j in range(W+2):
            if S[i][j]!="#":
                temp=L[i][j]+R[i][j]+U[i][j]+D[i][j]+1
                ans=max(ans,temp)
                
    # for i in range(H+2):
    #     print(L[i])
    # for i in range(H+2):
    #     print(R[i])
    # for i in range(H+2):
    #     print(U[i])
    # for i in range(H+2):
    #     print(D[i])
                
     i range(H+2) range H+2 H 2 for j in range(W+2):
            if S[i][j]!="#":
                temp=L[i][j]+R[i][j]+U[i][j]+D[i][j]+1
                ans=max(ans,temp)
                
    # for i in range(H+2):
    #     print(L[i])
    # for i in range(H+2):
    #     print(R[i])
    # for i in range(H+2):
    #     print(U[i])
    # for i in range(H+2):
    #     print(D[i])
                
     j range(W+2) range W+2 W 2 if S[i][j]!="#":
                temp=L[i][j]+R[i][j]+U[i][j]+D[i][j]+1
                ans=max(ans,temp)
                
    # for i in range(H+2):
    #     print(L[i])
    # for i in range(H+2):
    #     print(R[i])
    # for i in range(H+2):
    #     print(U[i])
    # for i in range(H+2):
    #     print(D[i])
                
     S[i][j]!="#" S[i][j] [i] S i j "#" temp=L[i][j]+R[i][j]+U[i][j]+D[i][j]+1 temp L[i][j]+R[i][j]+U[i][j]+D[i][j]+1 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 1 ans=max(ans,temp) ans max(ans,temp) max ans temp print(ans) print ans main() main def LI(): return list(map(int, input().split())) def LI(): return list(map(int, input().split())) LI def I(): return int(input()) def I(): return int(input()) I input = sys.stdin.readline sys.stdin.readline input def MI(): return map(int, input().split()) def MI(): return map(int, input().split()) MI def main():
    mod=10**9+7
    H,W=MI()
    S=[]
    S.append(["#"]*(W+2))
    for i in range(H):
        s=["#"]+list(input())+["#"]
        S.append(s)
    S.append(["#"]*(W+2))
    
    L=[[-1]*(W+2) for _ in range(H+2)]
    R=[[-1]*(W+2) for _ in range(H+2)]
    U=[[-1]*(W+2) for _ in range(H+2)]
    D=[[-1]*(W+2) for _ in range(H+2)]
    
    for i in range(1,H+1):
        for j in range(1,W+1):
            if S[i][j]!="#":
                L[i][j]=L[i][j-1]+1
                U[i][j]=U[i-1][j]+1
                
    for i in range(H,0,-1):
        for j in range(W,0,-1):
            if S[i][j]!="#":
                R[i][j]=R[i][j+1]+1
                D[i][j]=D[i+1][j]+1
                
    ans=0
    
    for i in range(H+2):
        for j in range(W+2):
            if S[i][j]!="#":
                temp=L[i][j]+R[i][j]+U[i][j]+D[i][j]+1
                ans=max(ans,temp)
                
    # for i in range(H+2):
    #     print(L[i])
    # for i in range(H+2):
    #     print(R[i])
    # for i in range(H+2):
    #     print(U[i])
    # for i in range(H+2):
    #     print(D[i])
                
    print(ans) def main():
    mod=10**9+7
    H,W=MI()
    S=[]
    S.append(["#"]*(W+2))
    for i in range(H):
        s=["#"]+list(input())+["#"]
        S.append(s)
    S.append(["#"]*(W+2))
    
    L=[[-1]*(W+2) for _ in range(H+2)]
    R=[[-1]*(W+2) for _ in range(H+2)]
    U=[[-1]*(W+2) for _ in range(H+2)]
    D=[[-1]*(W+2) for _ in range(H+2)]
    
    for i in range(1,H+1):
        for j in range(1,W+1):
            if S[i][j]!="#":
                L[i][j]=L[i][j-1]+1
                U[i][j]=U[i-1][j]+1
                
    for i in range(H,0,-1):
        for j in range(W,0,-1):
            if S[i][j]!="#":
                R[i][j]=R[i][j+1]+1
                D[i][j]=D[i+1][j]+1
                
    ans=0
    
    for i in range(H+2):
        for j in range(W+2):
            if S[i][j]!="#":
                temp=L[i][j]+R[i][j]+U[i][j]+D[i][j]+1
                ans=max(ans,temp)
                
    # for i in range(H+2):
    #     print(L[i])
    # for i in range(H+2):
    #     print(R[i])
    # for i in range(H+2):
    #     print(U[i])
    # for i in range(H+2):
    #     print(D[i])
                
    print(ans) main
import sys
input = sys.stdin.readline

def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))

def main():
    mod=10**9+7
    H,W=MI()
    S=[]
    S.append(["#"]*(W+2))
    for i in range(H):
        s=["#"]+list(input())+["#"]
        S.append(s)
    S.append(["#"]*(W+2))
    
    L=[[-1]*(W+2) for _ in range(H+2)]
    R=[[-1]*(W+2) for _ in range(H+2)]
    U=[[-1]*(W+2) for _ in range(H+2)]
    D=[[-1]*(W+2) for _ in range(H+2)]
    
    for i in range(1,H+1):
        for j in range(1,W+1):
            if S[i][j]!="#":
                L[i][j]=L[i][j-1]+1
                U[i][j]=U[i-1][j]+1
                
    for i in range(H,0,-1):
        for j in range(W,0,-1):
            if S[i][j]!="#":
                R[i][j]=R[i][j+1]+1
                D[i][j]=D[i+1][j]+1
                
    ans=0
    
    for i in range(H+2):
        for j in range(W+2):
            if S[i][j]!="#":
                temp=L[i][j]+R[i][j]+U[i][j]+D[i][j]+1
                ans=max(ans,temp)
                
    # for i in range(H+2):
    #     print(L[i])
    # for i in range(H+2):
    #     print(R[i])
    # for i in range(H+2):
    #     print(U[i])
    # for i in range(H+2):
    #     print(D[i])
                
    print(ans)

main()
