H,W =list(map(int,input().split()))

S=[[] for _ in range(H+2)]

for i in range(H):

    S[i+1]="#"+eval(input())+"#"

S[0]="#"*(W+2)

S[-1]="#"*(W+2)



hori=[[0]*(W+2) for _ in range(H+2)]

ver=[[0]*(W+2) for _ in range(H+2)]





def count(i,j):

    if hori[i][j-1]==0:

        count=0

        for k in range(W):

            if S[i][j+k]==".":

                count+=1

            else:

                break

        hori[i][j]=count

    else:

        hori[i][j]=hori[i][j-1]

        

    if ver[i-1][j]==0:

        count=0

        for k in range(H):

            if S[i+k][j]==".":

                count+=1

            else:

                break

        ver[i][j]=count

    else:

        ver[i][j]=ver[i-1][j]

    return hori[i][j]+ver[i][j]-1

    

ans=0

for i in range(1,H+1):

    for j in range(1,W+1):

        if S[i][j]==".":

            ans=max(ans,count(i,j))

print(ans)
import sys

input = sys.stdin.readline



def I(): return int(eval(input()))

def MI(): return list(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(eval(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()

H, W = list(map(int, input().split()))
S = [[] for _ in range(H + 2)]
for i in range(H):
    S[i + 1] = "#" + eval(input()) + "#"
S[0] = "#" * (W + 2)
S[-1] = "#" * (W + 2)
hori = [[0] * (W + 2) for _ in range(H + 2)]
ver = [[0] * (W + 2) for _ in range(H + 2)]


def count(i, j):
    if hori[i][j - 1] == 0:
        count = 0
        for k in range(W):
            if S[i][j + k] == ".":
                count += 1
            else:
                break
        hori[i][j] = count
    else:
        hori[i][j] = hori[i][j - 1]
    if ver[i - 1][j] == 0:
        count = 0
        for k in range(H):
            if S[i + k][j] == ".":
                count += 1
            else:
                break
        ver[i][j] = count
    else:
        ver[i][j] = ver[i - 1][j]
    return hori[i][j] + ver[i][j] - 1


ans = 0
for i in range(1, H + 1):
    for j in range(1, W + 1):
        if S[i][j] == ".":
            ans = max(ans, count(i, j))
print(ans)

import sys

input = sys.stdin.readline


def I():
    return int(eval(input()))


def MI():
    return list(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(eval(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()

-H, W = list(map(int, input().split())) -S = [[] for _ in range(H + 2)] -for i in range(H): -    S[i + 1] = "#" + eval(input()) + "#" -S[0] = "#" * (W + 2) -S[-1] = "#" * (W + 2) -hori = [[0] * (W + 2) for _ in range(H + 2)] -ver = [[0] * (W + 2) for _ in range(H + 2)] +import sys + +input = sys.stdin.readline -def count(i, j): -    if hori[i][j - 1] == 0: -        count = 0 -        for k in range(W): -            if S[i][j + k] == ".": -                count += 1 -            else: -                break -        hori[i][j] = count -    else: -        hori[i][j] = hori[i][j - 1] -    if ver[i - 1][j] == 0: -        count = 0 -        for k in range(H): -            if S[i + k][j] == ".": -                count += 1 -            else: -                break -        ver[i][j] = count -    else: -        ver[i][j] = ver[i - 1][j] -    return hori[i][j] + ver[i][j] - 1 +def I(): +    return int(eval(input())) -ans = 0 -for i in range(1, H + 1): -    for j in range(1, W + 1): -        if S[i][j] == ".": -            ans = max(ans, count(i, j)) -print(ans) +def MI(): +    return list(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(eval(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()