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

#障害物がない直線経路を前計算しておく
L = [[0] * w for i in range(h)]
R = [[0] * w for i in range(h)]
U = [[0] * w for i in range(h)]
D = [[0] * w for i in range(h)]

for i in range(h):
    for j in range(w):
        temp_L = s[i][j]
        temp_R = s[i][-(j + 1)]
        temp_U = s[i][j]
        temp_D = s[-(i + 1)][j]

        if temp_L == '#':L[i][j] = 0
        else:
            if j == 0:L[i][j] = 1
            else:L[i][j] = L[i][j - 1] + 1

        if temp_R == '#':R[i][-(j + 1)] = 0
        else:
            if j == 0:R[i][-(j + 1)] = 1
            else:R[i][-(j + 1)] = R[i][-(j + 1) + 1] + 1

        if temp_U == '#':U[i][j] = 0
        else:
            if i == 0:U[i][j] = 1
            else:U[i][j] = U[i - 1][j] + 1

        if temp_D == '#':D[-(i + 1)][j] = 0
        else:
            if i == 0:D[-(i + 1)][j] = 1
            else:D[-(i + 1)][j] = D[-(i + 1) + 1][j] + 1

ans = 0
for i in range(h):
    for j in range(w):
        if s[i][j] == '#':continue
        temp = L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3
        if ans < temp:ans = temp
print(ans)
#print(L,R,U,D,sep ='\n') h, w = map(int,input().split()) h map(int,input().split()) map int input().split() ().split () input split w list(input()) for i in range(h) for i in range(h) i range(h) range h for i in range(h) list(input()) list input() input s = [list(input()) for i in range(h)] s [list(input()) for i in range(h)] [0] * w for i in range(h) for i in range(h) i range(h) range h for i in range(h) [0] * w [0] 0 w L = [[0] * w for i in range(h)] L [[0] * w for i in range(h)] [0] * w for i in range(h) for i in range(h) i range(h) range h for i in range(h) [0] * w [0] 0 w R = [[0] * w for i in range(h)] R [[0] * w for i in range(h)] [0] * w for i in range(h) for i in range(h) i range(h) range h for i in range(h) [0] * w [0] 0 w U = [[0] * w for i in range(h)] U [[0] * w for i in range(h)] [0] * w for i in range(h) for i in range(h) i range(h) range h for i in range(h) [0] * w [0] 0 w D = [[0] * w for i in range(h)] D [[0] * w for i in range(h)] for i in range(h):
    for j in range(w):
        temp_L = s[i][j]
        temp_R = s[i][-(j + 1)]
        temp_U = s[i][j]
        temp_D = s[-(i + 1)][j]

        if temp_L == '#':L[i][j] = 0
        else:
            if j == 0:L[i][j] = 1
            else:L[i][j] = L[i][j - 1] + 1

        if temp_R == '#':R[i][-(j + 1)] = 0
        else:
            if j == 0:R[i][-(j + 1)] = 1
            else:R[i][-(j + 1)] = R[i][-(j + 1) + 1] + 1

        if temp_U == '#':U[i][j] = 0
        else:
            if i == 0:U[i][j] = 1
            else:U[i][j] = U[i - 1][j] + 1

        if temp_D == '#':D[-(i + 1)][j] = 0
        else:
            if i == 0:D[-(i + 1)][j] = 1
            else:D[-(i + 1)][j] = D[-(i + 1) + 1][j] + 1 i range(h) range h for j in range(w):
        temp_L = s[i][j]
        temp_R = s[i][-(j + 1)]
        temp_U = s[i][j]
        temp_D = s[-(i + 1)][j]

        if temp_L == '#':L[i][j] = 0
        else:
            if j == 0:L[i][j] = 1
            else:L[i][j] = L[i][j - 1] + 1

        if temp_R == '#':R[i][-(j + 1)] = 0
        else:
            if j == 0:R[i][-(j + 1)] = 1
            else:R[i][-(j + 1)] = R[i][-(j + 1) + 1] + 1

        if temp_U == '#':U[i][j] = 0
        else:
            if i == 0:U[i][j] = 1
            else:U[i][j] = U[i - 1][j] + 1

        if temp_D == '#':D[-(i + 1)][j] = 0
        else:
            if i == 0:D[-(i + 1)][j] = 1
            else:D[-(i + 1)][j] = D[-(i + 1) + 1][j] + 1 j range(w) range w temp_L = s[i][j] temp_L s[i][j] [i] s i j temp_R = s[i][-(j + 1)] temp_R s[i][-(j + 1)] [i] s i -(j + 1) j + 1 j 1 temp_U = s[i][j] temp_U s[i][j] [i] s i j temp_D = s[-(i + 1)][j] temp_D s[-(i + 1)][j] [-(i + 1)] s -(i + 1) i + 1 i 1 j if temp_L == '#':L[i][j] = 0
        else:
            if j == 0:L[i][j] = 1
            else:L[i][j] = L[i][j - 1] + 1

         temp_L == '#' temp_L '#' if j == 0:L[i][j] = 1
            else:L[i][j] = L[i][j - 1] + 1

         j == 0 j 0 if temp_R == '#':R[i][-(j + 1)] = 0
        else:
            if j == 0:R[i][-(j + 1)] = 1
            else:R[i][-(j + 1)] = R[i][-(j + 1) + 1] + 1

         temp_R == '#' temp_R '#' if j == 0:R[i][-(j + 1)] = 1
            else:R[i][-(j + 1)] = R[i][-(j + 1) + 1] + 1

         j == 0 j 0 if temp_U == '#':U[i][j] = 0
        else:
            if i == 0:U[i][j] = 1
            else:U[i][j] = U[i - 1][j] + 1

         temp_U == '#' temp_U '#' if i == 0:U[i][j] = 1
            else:U[i][j] = U[i - 1][j] + 1

         i == 0 i 0 if temp_D == '#':D[-(i + 1)][j] = 0
        else:
            if i == 0:D[-(i + 1)][j] = 1
            else:D[-(i + 1)][j] = D[-(i + 1) + 1][j] + 1 temp_D == '#' temp_D '#' if i == 0:D[-(i + 1)][j] = 1
            else:D[-(i + 1)][j] = D[-(i + 1) + 1][j] + 1 i == 0 i 0 ans = 0 ans 0 for i in range(h):
    for j in range(w):
        if s[i][j] == '#':continue
        temp = L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3
        if ans < temp:ans = temp i range(h) range h for j in range(w):
        if s[i][j] == '#':continue
        temp = L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3
        if ans < temp:ans = temp j range(w) range w if s[i][j] == '#':continue
         s[i][j] == '#' s[i][j] [i] s i j '#' temp = L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3 temp L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3 L[i][j] + R[i][j] + U[i][j] + D[i][j] L[i][j] + R[i][j] + U[i][j] L[i][j] + R[i][j] L[i][j] [i] L i j R[i][j] [i] R i j U[i][j] [i] U i j D[i][j] [i] D i j 3 if ans < temp:an ans < temp ans temp print(ans) print ans temp_L = s[i][j] s[i][j] temp_L ans = 0 0 ans U = [[0] * w for i in range(h)] [[0] * w for i in range(h)] U L = [[0] * w for i in range(h)] [[0] * w for i in range(h)] L temp_D = s[-(i + 1)][j] s[-(i + 1)][j] temp_D h, w = map(int,input().split()) map(int,input().split()) h R = [[0] * w for i in range(h)] [[0] * w for i in range(h)] R temp_U = s[i][j] s[i][j] temp_U temp_R = s[i][-(j + 1)] s[i][-(j + 1)] temp_R w = map(int,input().split()) map(int,input().split()) w D = [[0] * w for i in range(h)] [[0] * w for i in range(h)] D temp = L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3 L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3 temp s = [list(input()) for i in range(h)] [list(input()) for i in range(h)] s
h, w = map(int,input().split())
s = [list(input()) for i in range(h)]

#障害物がない直線経路を前計算しておく
L = [[0] * w for i in range(h)]
R = [[0] * w for i in range(h)]
U = [[0] * w for i in range(h)]
D = [[0] * w for i in range(h)]

for i in range(h):
    for j in range(w):
        temp_L = s[i][j]
        temp_R = s[i][-(j + 1)]
        temp_U = s[i][j]
        temp_D = s[-(i + 1)][j]

        if temp_L == '#':L[i][j] = 0
        else:
            if j == 0:L[i][j] = 1
            else:L[i][j] = L[i][j - 1] + 1

        if temp_R == '#':R[i][-(j + 1)] = 0
        else:
            if j == 0:R[i][-(j + 1)] = 1
            else:R[i][-(j + 1)] = R[i][-(j + 1) + 1] + 1

        if temp_U == '#':U[i][j] = 0
        else:
            if i == 0:U[i][j] = 1
            else:U[i][j] = U[i - 1][j] + 1

        if temp_D == '#':D[-(i + 1)][j] = 0
        else:
            if i == 0:D[-(i + 1)][j] = 1
            else:D[-(i + 1)][j] = D[-(i + 1) + 1][j] + 1

ans = 0
for i in range(h):
    for j in range(w):
        if s[i][j] == '#':continue
        temp = L[i][j] + R[i][j] + U[i][j] + D[i][j] - 3
        if ans < temp:ans = temp
print(ans)
#print(L,R,U,D,sep ='\n')