# ABC129D - Lamp

def main():

    H, W, *S = open(0).read().split()

    H, W = int(H), int(W)

    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 = max(L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3 for i in range(H) for j in range(W))

    print(ans)





if __name__ == "__main__":

    main()

# ABC129D - Lamp

def main():

    H, W, *S = open(0).read().split()

    H, W = int(H), int(W)

    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 = -1

    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
def main():
    H, W, *S = open(0).read().split()
    H, W = int(H), int(W)
    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 = max(
        L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3 for i in range(H) for j in range(W)
    )
    print(ans)


if __name__ == "__main__":
    main()

# ABC129D - Lamp
def main():
    H, W, *S = open(0).read().split()
    H, W = int(H), int(W)
    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 = -1
    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()

-    ans = max( -        L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3 for i in range(H) for j in range(W) -    ) +    ans = -1 +    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)