### BUGGY CODE ###

h, w = map(int, input().split())
s = [input() for _ in range(h)]

front_is_air = False
count = 0


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

for i in range(h):
    for j in range(w):
        if front_is_air:
            if s[i][j] == ".":
                count += 1
                left[i][j] = count
            else:
                front_is_air = False
                count = 0

        else:
            if s[i][j] == ".":
                front_is_air = True
                count += 1
                left[i][j] = count

        if j == w-1:
            front_is_air = False
            count = 0


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

for i in range(h):
    for j in range(w-1, -1, -1):
        if front_is_air:
            if s[i][j] == ".":
                count += 1
                right[i][j] = count
            else:
                front_is_air = False
                count = 0

        else:
            if s[i][j] == ".":
                front_is_air = True
                count += 1
                right[i][j] = count

        if j == 0:
            front_is_air = False
            count = 0


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

for i in range(w):
    for j in range(h):
        if front_is_air:
            if s[j][i] == ".":
                count += 1
                up[j][i] = count
            else:
                front_is_air = False
                count = 0

        else:
            if s[j][i] == ".":
                count += 1
                front_is_air = True
                up[j][i] = count

        if j == h-1:
            front_is_air = False
            count = 0


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

for i in range(w):
    for j in range(h-1, -1, -1):
        if front_is_air:
            if s[j][i] == ".":
                count += 1
                down[j][i] = count
            else:
                front_is_air = False
                count = 0

        else:
            if s[j][i] == ".":
                count += 1
                front_is_air = True
                down[j][i] = count

        if j == 0:
            front_is_air = False
            count = 0


memo = []

for i in range(h):
    for j in range(w):
        memo.append(left[i][j] + right[i][j] + up[i][j] + down[i][j] - 3)

print(max(memo))

### FIXED CODE ###

h, w = map(int, input().split())
s = [input() for _ in range(h)]

front_is_air = False
count = 0


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

for i in range(h):
    for j in range(w):
        if front_is_air:
            if s[i][j] == ".":
                count += 1
                left[i][j] = count
            else:
                front_is_air = False
                count = 0

        else:
            if s[i][j] == ".":
                front_is_air = True
                count += 1
                left[i][j] = count

        if j == w-1:
            front_is_air = False
            count = 0


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

for i in range(h):
    for j in range(w-1, -1, -1):
        if front_is_air:
            if s[i][j] == ".":
                count += 1
                right[i][j] = count
            else:
                front_is_air = False
                count = 0

        else:
            if s[i][j] == ".":
                front_is_air = True
                count += 1
                right[i][j] = count

        if j == 0:
            front_is_air = False
            count = 0


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

for i in range(w):
    for j in range(h):
        if front_is_air:
            if s[j][i] == ".":
                count += 1
                up[j][i] = count
            else:
                front_is_air = False
                count = 0

        else:
            if s[j][i] == ".":
                count += 1
                front_is_air = True
                up[j][i] = count

        if j == h-1:
            front_is_air = False
            count = 0


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

for i in range(w):
    for j in range(h-1, -1, -1):
        if front_is_air:
            if s[j][i] == ".":
                count += 1
                down[j][i] = count
            else:
                front_is_air = False
                count = 0

        else:
            if s[j][i] == ".":
                count += 1
                front_is_air = True
                down[j][i] = count

        if j == 0:
            front_is_air = False
            count = 0


memo = []

for i in range(h):
    for j in range(w):
        memo.append(left[i][j] + right[i][j] + up[i][j] + down[i][j] - 3)

print(max(memo))