

import copy



h, w = list(map(int , input().split() ))



board = [eval(input()) for _ in range(h)]



left = [ [0]*w for _ in range(h)] 

right = copy.deepcopy(left )        #いくつ右のマスを照らせるか

down = copy.deepcopy(left)

up = copy.deepcopy(left)







for hi in range(h):

    for wi in range(w):



        if board[hi][wi] == '.':

            left[hi][wi] = 1

            up[hi][wi] = 1



            if 1 <= wi:

                left[hi][wi] += left[hi][wi-1]



            if 1 <= hi:

                up[hi][wi] += up[hi-1][wi]





        if board[hi][w-wi-1] =='.':

            right[hi][w-wi-1] = 1



            if 1<=wi:

                right[hi][w-wi-1] += right[hi][w-wi] 



        if board[h-hi-1][wi] == '.':

            down[h-hi-1][wi] = 1



            if 1 <= hi:

                down[h-hi-1][wi] += down[h-hi][wi]





def dbcheck():

    print()

    tag = ["r","l","d","u"]

    for t,x in zip(tag,[right,left,down,up]):

        print(t)

        for row in x:

            print(row)

        print()





#dbcheck()



ans = 0

for i in range(h):

    for j in range(w):

        t = right[i][j] + left[i][j] + up[i][j] + down[i][j]

        t -= 3

        ans = max(ans,t)



print(ans)


import copy



h, w = list(map(int , input().split() ))



board = [eval(input()) for _ in range(h)]



left = [ [0]*w for _ in range(h)] 

right = [ [0]*w for _ in range(h)]        #いくつ右のマスを照らせるか

down = [ [0]*w for _ in range(h)]

up = [ [0]*w for _ in range(h)]







for hi in range(h):

    for wi in range(w):



        if board[hi][wi] == '.':

            left[hi][wi] = 1

            up[hi][wi] = 1



            if 1 <= wi:

                left[hi][wi] += left[hi][wi-1]



            if 1 <= hi:

                up[hi][wi] += up[hi-1][wi]





        if board[hi][w-wi-1] =='.':

            right[hi][w-wi-1] = 1



            if 1<=wi:

                right[hi][w-wi-1] += right[hi][w-wi] 



        if board[h-hi-1][wi] == '.':

            down[h-hi-1][wi] = 1



            if 1 <= hi:

                down[h-hi-1][wi] += down[h-hi][wi]





def dbcheck():

    print()

    tag = ["r","l","d","u"]

    for t,x in zip(tag,[right,left,down,up]):

        print(t)

        for row in x:

            print(row)

        print()





#dbcheck()



ans = 0

for i in range(h):

    for j in range(w):

        t = right[i][j] + left[i][j] + up[i][j] + down[i][j]

        t -= 3

        ans = max(ans,t)



print(ans)
import copy

h, w = list(map(int, input().split()))
board = [eval(input()) for _ in range(h)]
left = [[0] * w for _ in range(h)]
right = copy.deepcopy(left)  # いくつ右のマスを照らせるか
down = copy.deepcopy(left)
up = copy.deepcopy(left)
for hi in range(h):
    for wi in range(w):
        if board[hi][wi] == ".":
            left[hi][wi] = 1
            up[hi][wi] = 1
            if 1 <= wi:
                left[hi][wi] += left[hi][wi - 1]
            if 1 <= hi:
                up[hi][wi] += up[hi - 1][wi]
        if board[hi][w - wi - 1] == ".":
            right[hi][w - wi - 1] = 1
            if 1 <= wi:
                right[hi][w - wi - 1] += right[hi][w - wi]
        if board[h - hi - 1][wi] == ".":
            down[h - hi - 1][wi] = 1
            if 1 <= hi:
                down[h - hi - 1][wi] += down[h - hi][wi]


def dbcheck():
    print()
    tag = ["r", "l", "d", "u"]
    for t, x in zip(tag, [right, left, down, up]):
        print(t)
        for row in x:
            print(row)
        print()


# dbcheck()
ans = 0
for i in range(h):
    for j in range(w):
        t = right[i][j] + left[i][j] + up[i][j] + down[i][j]
        t -= 3
        ans = max(ans, t)
print(ans)

import copy

h, w = list(map(int, input().split()))
board = [eval(input()) for _ in range(h)]
left = [[0] * w for _ in range(h)]
right = [[0] * w for _ in range(h)]  # いくつ右のマスを照らせるか
down = [[0] * w for _ in range(h)]
up = [[0] * w for _ in range(h)]
for hi in range(h):
    for wi in range(w):
        if board[hi][wi] == ".":
            left[hi][wi] = 1
            up[hi][wi] = 1
            if 1 <= wi:
                left[hi][wi] += left[hi][wi - 1]
            if 1 <= hi:
                up[hi][wi] += up[hi - 1][wi]
        if board[hi][w - wi - 1] == ".":
            right[hi][w - wi - 1] = 1
            if 1 <= wi:
                right[hi][w - wi - 1] += right[hi][w - wi]
        if board[h - hi - 1][wi] == ".":
            down[h - hi - 1][wi] = 1
            if 1 <= hi:
                down[h - hi - 1][wi] += down[h - hi][wi]


def dbcheck():
    print()
    tag = ["r", "l", "d", "u"]
    for t, x in zip(tag, [right, left, down, up]):
        print(t)
        for row in x:
            print(row)
        print()


# dbcheck()
ans = 0
for i in range(h):
    for j in range(w):
        t = right[i][j] + left[i][j] + up[i][j] + down[i][j]
        t -= 3
        ans = max(ans, t)
print(ans)

-right = copy.deepcopy(left)  # いくつ右のマスを照らせるか -down = copy.deepcopy(left) -up = copy.deepcopy(left) +right = [[0] * w for _ in range(h)]  # いくつ右のマスを照らせるか +down = [[0] * w for _ in range(h)] +up = [[0] * w for _ in range(h)]