# coding: utf-8

# Your code here!





#n = int(input())

#s = input()

#a = [int(i) for i in input().split()]

#m = [[int(i) for i in input().split()] for j in range(n)] # 縦「n」行





h,w = [int(i) for i in input().split()]

b = [eval(input()) for i in range(h)]



ans = [[0]*w for i in range(h)]



for i in range(h):

    res = 0

    for j in range(w):

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

            ans[i][j] += res

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

            res += 1

        else:

            res = 0



#print(ans)



for i in range(h):

    res = 0

    for j in range(w-1,-1,-1):

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

            ans[i][j] += res

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

            res += 1

        else:

            res = 0



#print(ans)



for j in range(w):

    res = 0

    for i in range(h):

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

            ans[i][j] += res

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

            res += 1

        else:

            res = 0



#print(ans)



for j in range(w):

    res = 0

    for i in range(h-1,-1,-1):

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

            ans[i][j] += res

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

            res += 1

        else:

            res = 0



#print(ans)



print((max(max(row) for row in ans) + 1))

# coding: utf-8

# Your code here!



h,w = [int(i) for i in input().split()]

b = [eval(input()) for i in range(h)]



l = [[0]*w for _ in [0]*h] #左にある白マス（自分含む）

r = [[0]*w for _ in [0]*h]

u = [[0]*w for _ in [0]*h] #上にある白マス（自分含む）

d = [[0]*w for _ in [0]*h]

for hi in range(h):

    for wj in range(w):

        if b[hi][wj] == '.':

            l[hi][wj] = l[hi][wj-1]+1

            u[hi][wj] = u[hi-1][wj]+1

        if b[hi][w-wj-1] == '.':

            r[hi][w-wj-1] = r[hi][-wj]+1

        if b[h-hi-1][wj] == '.':

            d[h-hi-1][wj] = d[-hi][wj]+1



ans = 0

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)
# coding: utf-8
# Your code here!
# n = int(input())
# s = input()
# a = [int(i) for i in input().split()]
# m = [[int(i) for i in input().split()] for j in range(n)] # 縦「n」行
h, w = [int(i) for i in input().split()]
b = [eval(input()) for i in range(h)]
ans = [[0] * w for i in range(h)]
for i in range(h):
    res = 0
    for j in range(w):
        if b[i][j] == ".":
            ans[i][j] += res
        if b[i][j] == ".":
            res += 1
        else:
            res = 0
# print(ans)
for i in range(h):
    res = 0
    for j in range(w - 1, -1, -1):
        if b[i][j] == ".":
            ans[i][j] += res
        if b[i][j] == ".":
            res += 1
        else:
            res = 0
# print(ans)
for j in range(w):
    res = 0
    for i in range(h):
        if b[i][j] == ".":
            ans[i][j] += res
        if b[i][j] == ".":
            res += 1
        else:
            res = 0
# print(ans)
for j in range(w):
    res = 0
    for i in range(h - 1, -1, -1):
        if b[i][j] == ".":
            ans[i][j] += res
        if b[i][j] == ".":
            res += 1
        else:
            res = 0
# print(ans)
print((max(max(row) for row in ans) + 1))

# coding: utf-8
# Your code here!
h, w = [int(i) for i in input().split()]
b = [eval(input()) for i in range(h)]
l = [[0] * w for _ in [0] * h]  # 左にある白マス（自分含む）
r = [[0] * w for _ in [0] * h]
u = [[0] * w for _ in [0] * h]  # 上にある白マス（自分含む）
d = [[0] * w for _ in [0] * h]
for hi in range(h):
    for wj in range(w):
        if b[hi][wj] == ".":
            l[hi][wj] = l[hi][wj - 1] + 1
            u[hi][wj] = u[hi - 1][wj] + 1
        if b[hi][w - wj - 1] == ".":
            r[hi][w - wj - 1] = r[hi][-wj] + 1
        if b[h - hi - 1][wj] == ".":
            d[h - hi - 1][wj] = d[-hi][wj] + 1
ans = 0
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)

-# n = int(input()) -# s = input() -# a = [int(i) for i in input().split()] -# m = [[int(i) for i in input().split()] for j in range(n)] # 縦「n」行 -ans = [[0] * w for i in range(h)] +l = [[0] * w for _ in [0] * h]  # 左にある白マス（自分含む） +r = [[0] * w for _ in [0] * h] +u = [[0] * w for _ in [0] * h]  # 上にある白マス（自分含む） +d = [[0] * w for _ in [0] * h] +for hi in range(h): +    for wj in range(w): +        if b[hi][wj] == ".": +            l[hi][wj] = l[hi][wj - 1] + 1 +            u[hi][wj] = u[hi - 1][wj] + 1 +        if b[hi][w - wj - 1] == ".": +            r[hi][w - wj - 1] = r[hi][-wj] + 1 +        if b[h - hi - 1][wj] == ".": +            d[h - hi - 1][wj] = d[-hi][wj] + 1 +ans = 0 -    res = 0 -        if b[i][j] == ".": -            ans[i][j] += res -        if b[i][j] == ".": -            res += 1 -        else: -            res = 0 -# print(ans) -for i in range(h): -    res = 0 -    for j in range(w - 1, -1, -1): -        if b[i][j] == ".": -            ans[i][j] += res -        if b[i][j] == ".": -            res += 1 -        else: -            res = 0 -# print(ans) -for j in range(w): -    res = 0 -    for i in range(h): -        if b[i][j] == ".": -            ans[i][j] += res -        if b[i][j] == ".": -            res += 1 -        else: -            res = 0 -# print(ans) -for j in range(w): -    res = 0 -    for i in range(h - 1, -1, -1): -        if b[i][j] == ".": -            ans[i][j] += res -        if b[i][j] == ".": -            res += 1 -        else: -            res = 0 -# print(ans) -print((max(max(row) for row in ans) + 1)) +        ans = max(ans, l[i][j] + r[i][j] + u[i][j] + d[i][j] - 3) +print(ans)