import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60


def main():
    H, W = map(int, readline().split())
    S = [readline().strip() for _ in range(H)]

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

    for i in range(H):
        c = 0
        for j in range(W):
            if S[i][j] == '#':
                c = 0
            else:
                L[i][j] = c
                c += 1
        c = 0
        for j in range(W - 1, -1, -1):
            if S[i][j] == '#':
                c = 0
            else:
                R[i][j] = c
                c += 1

    for j in range(W):
        c = 0
        for i in range(H):
            if S[i][j] == '#':
                c = 0
            else:
                U[i][j] = c
                c += 1
        c = 0
        for i in range(H - 1, -1, -1):
            if S[i][j] == '#':
                c = 0
            else:
                D[i][j] = c
                c += 1

    ans = 0
    for i in range(H):
        l, r, u, d = L[i], R[i], U[i], D[i]
        for j in range(W):
            if ans < l[j] + r[j] + u[j] + d[j] + 1:
                ans = l[j] + r[j] + u[j] + d[j] + 1

    print(ans)
    return


if __name__ == '__main__':
    main() import sys sys read = sys.stdin.read read sys.stdin.read sys.stdin sys stdin read readline = sys.stdin.readline readline sys.stdin.readline sys.stdin sys stdin readline readlines = sys.stdin.readlines readlines sys.stdin.readlines sys.stdin sys stdin readlines sys.setrecursionlimit(10 ** 9) sys.setrecursionlimit sys setrecursionlimit 10 ** 9 10 9 INF = 1 << 60 INF 1 << 60 1 60 def main():
    H, W = map(int, readline().split())
    S = [readline().strip() for _ in range(H)]

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

    for i in range(H):
        c = 0
        for j in range(W):
            if S[i][j] == '#':
                c = 0
            else:
                L[i][j] = c
                c += 1
        c = 0
        for j in range(W - 1, -1, -1):
            if S[i][j] == '#':
                c = 0
            else:
                R[i][j] = c
                c += 1

    for j in range(W):
        c = 0
        for i in range(H):
            if S[i][j] == '#':
                c = 0
            else:
                U[i][j] = c
                c += 1
        c = 0
        for i in range(H - 1, -1, -1):
            if S[i][j] == '#':
                c = 0
            else:
                D[i][j] = c
                c += 1

    ans = 0
    for i in range(H):
        l, r, u, d = L[i], R[i], U[i], D[i]
        for j in range(W):
            if ans < l[j] + r[j] + u[j] + d[j] + 1:
                ans = l[j] + r[j] + u[j] + d[j] + 1

    print(ans)
    return main H, W = map(int, readline().split()) H map(int, readline().split()) map int readline().split() ().split () readline split W readline().strip() for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) readline().strip() ().strip () readline strip S = [readline().strip() for _ in range(H)] S [readline().strip() for _ in range(H)] [0] * W for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) [0] * W [0] 0 W L = [[0] * W for _ in range(H)] L [[0] * W for _ in range(H)] [0] * W for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) [0] * W [0] 0 W R = [[0] * W for _ in range(H)] R [[0] * W for _ in range(H)] [0] * W for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) [0] * W [0] 0 W U = [[0] * W for _ in range(H)] U [[0] * W for _ in range(H)] [0] * W for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) [0] * W [0] 0 W D = [[0] * W for _ in range(H)] D [[0] * W for _ in range(H)] for i in range(H):
        c = 0
        for j in range(W):
            if S[i][j] == '#':
                c = 0
            else:
                L[i][j] = c
                c += 1
        c = 0
        for j in range(W - 1, -1, -1):
            if S[i][j] == '#':
                c = 0
            else:
                R[i][j] = c
                c += 1

     i range(H) range H c = 0 c 0 for j in range(W):
            if S[i][j] == '#':
                c = 0
            else:
                L[i][j] = c
                c += 1
         j range(W) range W if S[i][j] == '#':
                c = 0
            else:
                L[i][j] = c
                c += 1
         S[i][j] == '#' S[i][j] [i] S i j '#' c = 0 c 0 L[i][j] = c L[i][j] [i] L i j c c += 1 c 1 c = 0 c 0 for j in range(W - 1, -1, -1):
            if S[i][j] == '#':
                c = 0
            else:
                R[i][j] = c
                c += 1

     j range(W - 1, -1, -1) range W - 1 W 1 -1 -1 if S[i][j] == '#':
                c = 0
            else:
                R[i][j] = c
                c += 1

     S[i][j] == '#' S[i][j] [i] S i j '#' c = 0 c 0 R[i][j] = c R[i][j] [i] R i j c c += 1 c 1 for j in range(W):
        c = 0
        for i in range(H):
            if S[i][j] == '#':
                c = 0
            else:
                U[i][j] = c
                c += 1
        c = 0
        for i in range(H - 1, -1, -1):
            if S[i][j] == '#':
                c = 0
            else:
                D[i][j] = c
                c += 1

     j range(W) range W c = 0 c 0 for i in range(H):
            if S[i][j] == '#':
                c = 0
            else:
                U[i][j] = c
                c += 1
         i range(H) range H if S[i][j] == '#':
                c = 0
            else:
                U[i][j] = c
                c += 1
         S[i][j] == '#' S[i][j] [i] S i j '#' c = 0 c 0 U[i][j] = c U[i][j] [i] U i j c c += 1 c 1 c = 0 c 0 for i in range(H - 1, -1, -1):
            if S[i][j] == '#':
                c = 0
            else:
                D[i][j] = c
                c += 1

     i range(H - 1, -1, -1) range H - 1 H 1 -1 -1 if S[i][j] == '#':
                c = 0
            else:
                D[i][j] = c
                c += 1

     S[i][j] == '#' S[i][j] [i] S i j '#' c = 0 c 0 D[i][j] = c D[i][j] [i] D i j c c += 1 c 1 ans = 0 ans 0 for i in range(H):
        l, r, u, d = L[i], R[i], U[i], D[i]
        for j in range(W):
            if ans < l[j] + r[j] + u[j] + d[j] + 1:
                ans = l[j] + r[j] + u[j] + d[j] + 1

     i range(H) range H l, r, u, d = L[i], R[i], U[i], D[i] l L[i] L i r R[i] R i u U[i] U i d D[i] D i for j in range(W):
            if ans < l[j] + r[j] + u[j] + d[j] + 1:
                ans = l[j] + r[j] + u[j] + d[j] + 1

     j range(W) range W if ans < l[j] + r[j] + u[j] + d[j] + 1:
                ans = l[j] + r[j] + u[j] + d[j] + 1

     ans < l[j] + r[j] + u[j] + d[j] + 1 ans l[j] + r[j] + u[j] + d[j] + 1 l[j] + r[j] + u[j] + d[j] l[j] + r[j] + u[j] l[j] + r[j] l[j] l j r[j] r j u[j] u j d[j] d j 1 ans = l[j] + r[j] + u[j] + d[j] + 1 ans l[j] + r[j] + u[j] + d[j] + 1 l[j] + r[j] + u[j] + d[j] l[j] + r[j] + u[j] l[j] + r[j] l[j] l j r[j] r j u[j] u j d[j] d j 1 print(ans) print ans return if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main readline = sys.stdin.readline sys.stdin.readline readline read = sys.stdin.read sys.stdin.read read readlines = sys.stdin.readlines sys.stdin.readlines readlines def main():
    H, W = map(int, readline().split())
    S = [readline().strip() for _ in range(H)]

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

    for i in range(H):
        c = 0
        for j in range(W):
            if S[i][j] == '#':
                c = 0
            else:
                L[i][j] = c
                c += 1
        c = 0
        for j in range(W - 1, -1, -1):
            if S[i][j] == '#':
                c = 0
            else:
                R[i][j] = c
                c += 1

    for j in range(W):
        c = 0
        for i in range(H):
            if S[i][j] == '#':
                c = 0
            else:
                U[i][j] = c
                c += 1
        c = 0
        for i in range(H - 1, -1, -1):
            if S[i][j] == '#':
                c = 0
            else:
                D[i][j] = c
                c += 1

    ans = 0
    for i in range(H):
        l, r, u, d = L[i], R[i], U[i], D[i]
        for j in range(W):
            if ans < l[j] + r[j] + u[j] + d[j] + 1:
                ans = l[j] + r[j] + u[j] + d[j] + 1

    print(ans)
    return def main():
    H, W = map(int, readline().split())
    S = [readline().strip() for _ in range(H)]

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

    for i in range(H):
        c = 0
        for j in range(W):
            if S[i][j] == '#':
                c = 0
            else:
                L[i][j] = c
                c += 1
        c = 0
        for j in range(W - 1, -1, -1):
            if S[i][j] == '#':
                c = 0
            else:
                R[i][j] = c
                c += 1

    for j in range(W):
        c = 0
        for i in range(H):
            if S[i][j] == '#':
                c = 0
            else:
                U[i][j] = c
                c += 1
        c = 0
        for i in range(H - 1, -1, -1):
            if S[i][j] == '#':
                c = 0
            else:
                D[i][j] = c
                c += 1

    ans = 0
    for i in range(H):
        l, r, u, d = L[i], R[i], U[i], D[i]
        for j in range(W):
            if ans < l[j] + r[j] + u[j] + d[j] + 1:
                ans = l[j] + r[j] + u[j] + d[j] + 1

    print(ans)
    return main INF = 1 << 60 1 << 60 INF
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60


def main():
    H, W = map(int, readline().split())
    S = [readline().strip() for _ in range(H)]

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

    for i in range(H):
        c = 0
        for j in range(W):
            if S[i][j] == '#':
                c = 0
            else:
                L[i][j] = c
                c += 1
        c = 0
        for j in range(W - 1, -1, -1):
            if S[i][j] == '#':
                c = 0
            else:
                R[i][j] = c
                c += 1

    for j in range(W):
        c = 0
        for i in range(H):
            if S[i][j] == '#':
                c = 0
            else:
                U[i][j] = c
                c += 1
        c = 0
        for i in range(H - 1, -1, -1):
            if S[i][j] == '#':
                c = 0
            else:
                D[i][j] = c
                c += 1

    ans = 0
    for i in range(H):
        l, r, u, d = L[i], R[i], U[i], D[i]
        for j in range(W):
            if ans < l[j] + r[j] + u[j] + d[j] + 1:
                ans = l[j] + r[j] + u[j] + d[j] + 1

    print(ans)
    return


if __name__ == '__main__':
    main()
