from sys import stdin

import math

import fractions

from collections import deque

import itertools



INF = 10 ** 10



# H <= 2000, W <= 2000

# H*W -> O(4*10^6)

H, W = [int(x) for x in stdin.readline().rstrip().split()]

S = [[x for x in stdin.readline().rstrip()] for _ in range(H)]



# L[i][j]: i行目j列目に明かりを置いたときにそこから左方向に照らされるマスの個数

#          (i行目j列目のマスを含む)

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

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

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

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



# L

for i in range(H):

    for j in range(W):

        if S[i][j] == "#":

            L[i][j] = 0

            continue



        if j == 0:

            L[i][j] = 1

        # j >= 1

        else:

            L[i][j] = L[i][j-1] + 1



# R

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

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

        if S[i][j] == "#":

            R[i][j] = 0

            continue



        if j == W-1:

            R[i][j] = 1

        else:

            R[i][j] = R[i][j+1] + 1



# U

for j in range(W):

    for i in range(H):

        if S[i][j] == "#":

            U[i][j] = 0

            continue



        if i == 0:

            U[i][j] = 1

        else:

            U[i][j] = U[i-1][j] + 1



# D

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

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

        if S[i][j] == "#":

            D[i][j] = 0

            continue



        if i == H-1:

            D[i][j] = 1

        else:

            D[i][j] = D[i+1][j] + 1





ans = -INF



for i in range(H):

    for j in range(W):

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



# for DEBUG

#print(*S, sep="\n")

#print(L)

#print(R)

#print(D)

#print(U)



print(ans)
from sys import stdin

import math

import fractions

from collections import deque

import itertools



INF = 10 ** 10



# H <= 2000, W <= 2000

# H*W -> O(4*10^6)

H, W = [int(x) for x in stdin.readline().rstrip().split()]

S = [stdin.readline().rstrip() for _ in range(H)]



# L[i][j]: i行目j列目に明かりを置いたときにそこから左方向に照らされるマスの個数

#          (i行目j列目のマスを含む)

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

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

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

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



# L

for i in range(H):

    for j in range(W):

        if S[i][j] == "#":

            L[i][j] = 0

            continue



        if j == 0:

            L[i][j] = 1

        # j >= 1

        else:

            L[i][j] = L[i][j-1] + 1



# R

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

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

        if S[i][j] == "#":

            R[i][j] = 0

            continue



        if j == W-1:

            R[i][j] = 1

        else:

            R[i][j] = R[i][j+1] + 1



# U

for j in range(W):

    for i in range(H):

        if S[i][j] == "#":

            U[i][j] = 0

            continue



        if i == 0:

            U[i][j] = 1

        else:

            U[i][j] = U[i-1][j] + 1



# D

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

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

        if S[i][j] == "#":

            D[i][j] = 0

            continue



        if i == H-1:

            D[i][j] = 1

        else:

            D[i][j] = D[i+1][j] + 1





ans = -INF



for i in range(H):

    for j in range(W):

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



# for DEBUG

#print(*S, sep="\n")

#print(L)

#print(R)

#print(D)

#print(U)



print(ans)
from sys import stdin
import math
import fractions
from collections import deque
import itertools

INF = 10**10
# H <= 2000, W <= 2000
# H*W -> O(4*10^6)
H, W = [int(x) for x in stdin.readline().rstrip().split()]
S = [[x for x in stdin.readline().rstrip()] for _ in range(H)]
# L[i][j]: i行目j列目に明かりを置いたときにそこから左方向に照らされるマスの個数
#          (i行目j列目のマスを含む)
L = [[0] * W for _ in range(H)]
R = [[0] * W for _ in range(H)]
D = [[0] * W for _ in range(H)]
U = [[0] * W for _ in range(H)]
# L
for i in range(H):
    for j in range(W):
        if S[i][j] == "#":
            L[i][j] = 0
            continue
        if j == 0:
            L[i][j] = 1
        # j >= 1
        else:
            L[i][j] = L[i][j - 1] + 1
# R
for i in range(H - 1, -1, -1):
    for j in range(W - 1, -1, -1):
        if S[i][j] == "#":
            R[i][j] = 0
            continue
        if j == W - 1:
            R[i][j] = 1
        else:
            R[i][j] = R[i][j + 1] + 1
# U
for j in range(W):
    for i in range(H):
        if S[i][j] == "#":
            U[i][j] = 0
            continue
        if i == 0:
            U[i][j] = 1
        else:
            U[i][j] = U[i - 1][j] + 1
# D
for j in range(W - 1, -1, -1):
    for i in range(H - 1, -1, -1):
        if S[i][j] == "#":
            D[i][j] = 0
            continue
        if i == H - 1:
            D[i][j] = 1
        else:
            D[i][j] = D[i + 1][j] + 1
ans = -INF
for i in range(H):
    for j in range(W):
        ans = max(ans, L[i][j] + R[i][j] + D[i][j] + U[i][j] - 3)
# for DEBUG
# print(*S, sep="\n")
# print(L)
# print(R)
# print(D)
# print(U)
print(ans)

from sys import stdin
import math
import fractions
from collections import deque
import itertools

INF = 10**10
# H <= 2000, W <= 2000
# H*W -> O(4*10^6)
H, W = [int(x) for x in stdin.readline().rstrip().split()]
S = [stdin.readline().rstrip() for _ in range(H)]
# L[i][j]: i行目j列目に明かりを置いたときにそこから左方向に照らされるマスの個数
#          (i行目j列目のマスを含む)
L = [[0] * W for _ in range(H)]
R = [[0] * W for _ in range(H)]
D = [[0] * W for _ in range(H)]
U = [[0] * W for _ in range(H)]
# L
for i in range(H):
    for j in range(W):
        if S[i][j] == "#":
            L[i][j] = 0
            continue
        if j == 0:
            L[i][j] = 1
        # j >= 1
        else:
            L[i][j] = L[i][j - 1] + 1
# R
for i in range(H - 1, -1, -1):
    for j in range(W - 1, -1, -1):
        if S[i][j] == "#":
            R[i][j] = 0
            continue
        if j == W - 1:
            R[i][j] = 1
        else:
            R[i][j] = R[i][j + 1] + 1
# U
for j in range(W):
    for i in range(H):
        if S[i][j] == "#":
            U[i][j] = 0
            continue
        if i == 0:
            U[i][j] = 1
        else:
            U[i][j] = U[i - 1][j] + 1
# D
for j in range(W - 1, -1, -1):
    for i in range(H - 1, -1, -1):
        if S[i][j] == "#":
            D[i][j] = 0
            continue
        if i == H - 1:
            D[i][j] = 1
        else:
            D[i][j] = D[i + 1][j] + 1
ans = -INF
for i in range(H):
    for j in range(W):
        ans = max(ans, L[i][j] + R[i][j] + D[i][j] + U[i][j] - 3)
# for DEBUG
# print(*S, sep="\n")
# print(L)
# print(R)
# print(D)
# print(U)
print(ans)

-S = [[x for x in stdin.readline().rstrip()] for _ in range(H)] +S = [stdin.readline().rstrip() for _ in range(H)]