# ABC129D - Lamp

import sys

input = sys.stdin.readline



def main():

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

    S = tuple(input().rstrip() for _ in range(H))

    L, R = [[0] * W for _ in range(H)], [[0] * W for _ in range(H)]

    U, D = [[0] * W for _ in range(H)], [[0] * W for _ in range(H)]

    for x1 in range(H):

        for y1 in range(W):

            if S[x1][y1] == ".":  # left and upper sides of S[i][j]

                U[x1][y1] = U[x1 - 1][y1] + 1

                L[x1][y1] = L[x1][y1 - 1] + 1

            x2, y2 = -x1 - 1, -y1 - 1

            if S[x2][y2] == ".":  # right and under sides

                D[x2][y2] = D[x2 + 1][y2] + 1

                R[x2][y2] = R[x2][y2 + 1] + 1

    cand = [

        L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3 for i in range(H) for j in range(W)

    ]

    ans = max(cand)

    print(ans)





if __name__ == "__main__":

    main()
# ABC129D - Lamp

import sys

input = sys.stdin.readline



def main():

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

    S = tuple(input().rstrip() for _ in range(H))

    L, R = [[0] * W for _ in range(H)], [[0] * W for _ in range(H)]

    U, D = [[0] * W for _ in range(H)], [[0] * W for _ in range(H)]

    for x1 in range(H):

        for y1 in range(W):

            if S[x1][y1] == ".":  # left and upper sides of S[i][j]

                U[x1][y1] = U[x1 - 1][y1] + 1

                L[x1][y1] = L[x1][y1 - 1] + 1

            x2, y2 = -x1 - 1, -y1 - 1

            if S[x2][y2] == ".":  # right and under sides

                D[x2][y2] = D[x2 + 1][y2] + 1

                R[x2][y2] = R[x2][y2 + 1] + 1

    ans = -float("inf")

    for i in range(H):

        for j in range(W):

            ans = max(ans, L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3)

    print(ans)





if __name__ == "__main__":

    main()
# ABC129D - Lamp
import sys

input = sys.stdin.readline


def main():
    H, W = tuple(map(int, input().split()))
    S = tuple(input().rstrip() for _ in range(H))
    L, R = [[0] * W for _ in range(H)], [[0] * W for _ in range(H)]
    U, D = [[0] * W for _ in range(H)], [[0] * W for _ in range(H)]
    for x1 in range(H):
        for y1 in range(W):
            if S[x1][y1] == ".":  # left and upper sides of S[i][j]
                U[x1][y1] = U[x1 - 1][y1] + 1
                L[x1][y1] = L[x1][y1 - 1] + 1
            x2, y2 = -x1 - 1, -y1 - 1
            if S[x2][y2] == ".":  # right and under sides
                D[x2][y2] = D[x2 + 1][y2] + 1
                R[x2][y2] = R[x2][y2 + 1] + 1
    cand = [
        L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3 for i in range(H) for j in range(W)
    ]
    ans = max(cand)
    print(ans)


if __name__ == "__main__":
    main()

# ABC129D - Lamp
import sys

input = sys.stdin.readline


def main():
    H, W = tuple(map(int, input().split()))
    S = tuple(input().rstrip() for _ in range(H))
    L, R = [[0] * W for _ in range(H)], [[0] * W for _ in range(H)]
    U, D = [[0] * W for _ in range(H)], [[0] * W for _ in range(H)]
    for x1 in range(H):
        for y1 in range(W):
            if S[x1][y1] == ".":  # left and upper sides of S[i][j]
                U[x1][y1] = U[x1 - 1][y1] + 1
                L[x1][y1] = L[x1][y1 - 1] + 1
            x2, y2 = -x1 - 1, -y1 - 1
            if S[x2][y2] == ".":  # right and under sides
                D[x2][y2] = D[x2 + 1][y2] + 1
                R[x2][y2] = R[x2][y2 + 1] + 1
    ans = -float("inf")
    for i in range(H):
        for j in range(W):
            ans = max(ans, L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3)
    print(ans)


if __name__ == "__main__":
    main()

-    cand = [ -        L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3 for i in range(H) for j in range(W) -    ] -    ans = max(cand) +    ans = -float("inf") +    for i in range(H): +        for j in range(W): +            ans = max(ans, L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3)