# 解説を参考に作成
# import sys
# sys.setrecursionlimit(10 ** 6)
# import bisect
# from collections import deque
# from decorator import stop_watch
# 
# 
# @stop_watch
def solve(H, W, Si):
    R = [[0] * W for _ in range(H)]
    L = [[0] * W for _ in range(H)]
    D = [[0] * W for _ in range(H)]
    U = [[0] * W for _ in range(H)]

    # for R
    for h in range(H):
        for w in range(W):
            if Si[h][w] == '#':
                R[h][w] = 0
                continue
            if w == 0:
                R[h][w] = 1
            else:
                R[h][w] = R[h][w - 1] + 1
    # for L
    for h in range(H):
        for w in range(W):
            if Si[h][W - w - 1] == '#':
                L[h][W - w - 1] = 0
                continue
            if w == 0:
                L[h][W - w - 1] = 1
            else:
                L[h][W - w - 1] = L[h][W - w] + 1
    # for D
    for w in range(W):
        for h in range(H):
            if Si[h][w] == '#':
                D[h][w] = 0
                continue
            if h == 0:
                D[h][w] = 1
            else:
                D[h][w] = D[h - 1][w] + 1
    # for U
    for w in range(W):
        for h in range(H):
            if Si[H - h - 1][w] == '#':
                U[H - h - 1][w] = 0
                continue
            if h == 0:
                U[H - h - 1][w] = 1
            else:
                U[H - h - 1][w] = U[H - h][w] + 1

    ans = 0
    for h in range(H):
        for w in range(W):
            ans = max(ans, R[h][w] + L[h][w] + D[h][w] + U[h][w] - 3)
    print(ans)


if __name__ == '__main__':
    H, W = map(int, input().split())
    Si = [input() for _ in range(H)]

    # # test
    # import func
    # H, W = 2000, 2000
    # Si = [''.join([func.random_str(W, '.')]) for _ in range(H)]
    # for s in Si:
    #     print(s)
    solve(H, W, Si) def solve(H, W, Si):
    R = [[0] * W for _ in range(H)]
    L = [[0] * W for _ in range(H)]
    D = [[0] * W for _ in range(H)]
    U = [[0] * W for _ in range(H)]

    # for R
    for h in range(H):
        for w in range(W):
            if Si[h][w] == '#':
                R[h][w] = 0
                continue
            if w == 0:
                R[h][w] = 1
            else:
                R[h][w] = R[h][w - 1] + 1
    # for L
    for h in range(H):
        for w in range(W):
            if Si[h][W - w - 1] == '#':
                L[h][W - w - 1] = 0
                continue
            if w == 0:
                L[h][W - w - 1] = 1
            else:
                L[h][W - w - 1] = L[h][W - w] + 1
    # for D
    for w in range(W):
        for h in range(H):
            if Si[h][w] == '#':
                D[h][w] = 0
                continue
            if h == 0:
                D[h][w] = 1
            else:
                D[h][w] = D[h - 1][w] + 1
    # for U
    for w in range(W):
        for h in range(H):
            if Si[H - h - 1][w] == '#':
                U[H - h - 1][w] = 0
                continue
            if h == 0:
                U[H - h - 1][w] = 1
            else:
                U[H - h - 1][w] = U[H - h][w] + 1

    ans = 0
    for h in range(H):
        for w in range(W):
            ans = max(ans, R[h][w] + L[h][w] + D[h][w] + U[h][w] - 3)
    print(ans) solve [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 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 D = [[0] * W for _ in range(H)] D [[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)] for h in range(H):
        for w in range(W):
            if Si[h][w] == '#':
                R[h][w] = 0
                continue
            if w == 0:
                R[h][w] = 1
            else:
                R[h][w] = R[h][w - 1] + 1
    # for L
     h range(H) range H for w in range(W):
            if Si[h][w] == '#':
                R[h][w] = 0
                continue
            if w == 0:
                R[h][w] = 1
            else:
                R[h][w] = R[h][w - 1] + 1
    # for L
     w range(W) range W if Si[h][w] == '#':
                R[h][w] = 0
                continue
             Si[h][w] == '#' Si[h][w] [h] Si h w '#' R[h][w] = 0 R[h][w] [h] R h w 0 continue if w == 0:
                R[h][w] = 1
            else:
                R[h][w] = R[h][w - 1] + 1
    # for L
     w == 0 w 0 R[h][w] = 1 R[h][w] [h] R h w 1 R[h][w] = R[h][w - 1] + 1 R[h][w] [h] R h w R[h][w - 1] + 1 R[h][w - 1] [h] R h w - 1 w 1 1 for h in range(H):
        for w in range(W):
            if Si[h][W - w - 1] == '#':
                L[h][W - w - 1] = 0
                continue
            if w == 0:
                L[h][W - w - 1] = 1
            else:
                L[h][W - w - 1] = L[h][W - w] + 1
    # for D
     h range(H) range H for w in range(W):
            if Si[h][W - w - 1] == '#':
                L[h][W - w - 1] = 0
                continue
            if w == 0:
                L[h][W - w - 1] = 1
            else:
                L[h][W - w - 1] = L[h][W - w] + 1
    # for D
     w range(W) range W if Si[h][W - w - 1] == '#':
                L[h][W - w - 1] = 0
                continue
             Si[h][W - w - 1] == '#' Si[h][W - w - 1] [h] Si h W - w - 1 W - w W w 1 '#' L[h][W - w - 1] = 0 L[h][W - w - 1] [h] L h W - w - 1 W - w W w 1 0 continue if w == 0:
                L[h][W - w - 1] = 1
            else:
                L[h][W - w - 1] = L[h][W - w] + 1
    # for D
     w == 0 w 0 L[h][W - w - 1] = 1 L[h][W - w - 1] [h] L h W - w - 1 W - w W w 1 1 L[h][W - w - 1] = L[h][W - w] + 1 L[h][W - w - 1] [h] L h W - w - 1 W - w W w 1 L[h][W - w] + 1 L[h][W - w] [h] L h W - w W w 1 for w in range(W):
        for h in range(H):
            if Si[h][w] == '#':
                D[h][w] = 0
                continue
            if h == 0:
                D[h][w] = 1
            else:
                D[h][w] = D[h - 1][w] + 1
    # for U
     w range(W) range W for h in range(H):
            if Si[h][w] == '#':
                D[h][w] = 0
                continue
            if h == 0:
                D[h][w] = 1
            else:
                D[h][w] = D[h - 1][w] + 1
    # for U
     h range(H) range H if Si[h][w] == '#':
                D[h][w] = 0
                continue
             Si[h][w] == '#' Si[h][w] [h] Si h w '#' D[h][w] = 0 D[h][w] [h] D h w 0 continue if h == 0:
                D[h][w] = 1
            else:
                D[h][w] = D[h - 1][w] + 1
    # for U
     h == 0 h 0 D[h][w] = 1 D[h][w] [h] D h w 1 D[h][w] = D[h - 1][w] + 1 D[h][w] [h] D h w D[h - 1][w] + 1 D[h - 1][w] [h - 1] D h - 1 h 1 w 1 for w in range(W):
        for h in range(H):
            if Si[H - h - 1][w] == '#':
                U[H - h - 1][w] = 0
                continue
            if h == 0:
                U[H - h - 1][w] = 1
            else:
                U[H - h - 1][w] = U[H - h][w] + 1

     w range(W) range W for h in range(H):
            if Si[H - h - 1][w] == '#':
                U[H - h - 1][w] = 0
                continue
            if h == 0:
                U[H - h - 1][w] = 1
            else:
                U[H - h - 1][w] = U[H - h][w] + 1

     h range(H) range H if Si[H - h - 1][w] == '#':
                U[H - h - 1][w] = 0
                continue
             Si[H - h - 1][w] == '#' Si[H - h - 1][w] [H - h - 1] Si H - h - 1 H - h H h 1 w '#' U[H - h - 1][w] = 0 U[H - h - 1][w] [H - h - 1] U H - h - 1 H - h H h 1 w 0 continue if h == 0:
                U[H - h - 1][w] = 1
            else:
                U[H - h - 1][w] = U[H - h][w] + 1

     h == 0 h 0 U[H - h - 1][w] = 1 U[H - h - 1][w] [H - h - 1] U H - h - 1 H - h H h 1 w 1 U[H - h - 1][w] = U[H - h][w] + 1 U[H - h - 1][w] [H - h - 1] U H - h - 1 H - h H h 1 w U[H - h][w] + 1 U[H - h][w] [H - h] U H - h H h w 1 ans = 0 ans 0 for h in range(H):
        for w in range(W):
            ans = max(ans, R[h][w] + L[h][w] + D[h][w] + U[h][w] - 3)
     h range(H) range H for w in range(W):
            ans = max(ans, R[h][w] + L[h][w] + D[h][w] + U[h][w] - 3)
     w range(W) range W ans = max(ans, R[h][w] + L[h][w] + D[h][w] + U[h][w] - 3) ans max(ans, R[h][w] + L[h][w] + D[h][w] + U[h][w] - 3) max ans R[h][w] + L[h][w] + D[h][w] + U[h][w] - 3 R[h][w] + L[h][w] + D[h][w] + U[h][w] R[h][w] + L[h][w] + D[h][w] R[h][w] + L[h][w] R[h][w] [h] R h w L[h][w] [h] L h w D[h][w] [h] D h w U[h][w] [h] U h w 3 print(ans) print ans H H W W Si Si if __name__ == '__main__':
    H, W = map(int, input().split())
    Si = [input() for _ in range(H)]

    # # test
    # import func
    # H, W = 2000, 2000
    # Si = [''.join([func.random_str(W, '.')]) for _ in range(H)]
    # for s in Si:
    #     print(s)
    solve(H, W, Si) __name__ == '__main__' __name__ '__main__' H, W = map(int, input().split()) H map(int, input().split()) map int input().split() ().split () input split W input() for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) input() input Si = [input() for _ in range(H)] Si [input() for _ in range(H)] solve(H, W, Si) solve H W Si H, W = map(int, input().split()) map(int, input().split()) H def solve(H, W, Si):
    R = [[0] * W for _ in range(H)]
    L = [[0] * W for _ in range(H)]
    D = [[0] * W for _ in range(H)]
    U = [[0] * W for _ in range(H)]

    # for R
    for h in range(H):
        for w in range(W):
            if Si[h][w] == '#':
                R[h][w] = 0
                continue
            if w == 0:
                R[h][w] = 1
            else:
                R[h][w] = R[h][w - 1] + 1
    # for L
    for h in range(H):
        for w in range(W):
            if Si[h][W - w - 1] == '#':
                L[h][W - w - 1] = 0
                continue
            if w == 0:
                L[h][W - w - 1] = 1
            else:
                L[h][W - w - 1] = L[h][W - w] + 1
    # for D
    for w in range(W):
        for h in range(H):
            if Si[h][w] == '#':
                D[h][w] = 0
                continue
            if h == 0:
                D[h][w] = 1
            else:
                D[h][w] = D[h - 1][w] + 1
    # for U
    for w in range(W):
        for h in range(H):
            if Si[H - h - 1][w] == '#':
                U[H - h - 1][w] = 0
                continue
            if h == 0:
                U[H - h - 1][w] = 1
            else:
                U[H - h - 1][w] = U[H - h][w] + 1

    ans = 0
    for h in range(H):
        for w in range(W):
            ans = max(ans, R[h][w] + L[h][w] + D[h][w] + U[h][w] - 3)
    print(ans) def solve(H, W, Si):
    R = [[0] * W for _ in range(H)]
    L = [[0] * W for _ in range(H)]
    D = [[0] * W for _ in range(H)]
    U = [[0] * W for _ in range(H)]

    # for R
    for h in range(H):
        for w in range(W):
            if Si[h][w] == '#':
                R[h][w] = 0
                continue
            if w == 0:
                R[h][w] = 1
            else:
                R[h][w] = R[h][w - 1] + 1
    # for L
    for h in range(H):
        for w in range(W):
            if Si[h][W - w - 1] == '#':
                L[h][W - w - 1] = 0
                continue
            if w == 0:
                L[h][W - w - 1] = 1
            else:
                L[h][W - w - 1] = L[h][W - w] + 1
    # for D
    for w in range(W):
        for h in range(H):
            if Si[h][w] == '#':
                D[h][w] = 0
                continue
            if h == 0:
                D[h][w] = 1
            else:
                D[h][w] = D[h - 1][w] + 1
    # for U
    for w in range(W):
        for h in range(H):
            if Si[H - h - 1][w] == '#':
                U[H - h - 1][w] = 0
                continue
            if h == 0:
                U[H - h - 1][w] = 1
            else:
                U[H - h - 1][w] = U[H - h][w] + 1

    ans = 0
    for h in range(H):
        for w in range(W):
            ans = max(ans, R[h][w] + L[h][w] + D[h][w] + U[h][w] - 3)
    print(ans) solve W = map(int, input().split()) map(int, input().split()) W Si = [input() for _ in range(H)] [input() for _ in range(H)] Si
# 解説を参考に作成
# import sys
# sys.setrecursionlimit(10 ** 6)
# import bisect
# from collections import deque
# from decorator import stop_watch
# 
# 
# @stop_watch
def solve(H, W, Si):
    R = [[0] * W for _ in range(H)]
    L = [[0] * W for _ in range(H)]
    D = [[0] * W for _ in range(H)]
    U = [[0] * W for _ in range(H)]

    # for R
    for h in range(H):
        for w in range(W):
            if Si[h][w] == '#':
                R[h][w] = 0
                continue
            if w == 0:
                R[h][w] = 1
            else:
                R[h][w] = R[h][w - 1] + 1
    # for L
    for h in range(H):
        for w in range(W):
            if Si[h][W - w - 1] == '#':
                L[h][W - w - 1] = 0
                continue
            if w == 0:
                L[h][W - w - 1] = 1
            else:
                L[h][W - w - 1] = L[h][W - w] + 1
    # for D
    for w in range(W):
        for h in range(H):
            if Si[h][w] == '#':
                D[h][w] = 0
                continue
            if h == 0:
                D[h][w] = 1
            else:
                D[h][w] = D[h - 1][w] + 1
    # for U
    for w in range(W):
        for h in range(H):
            if Si[H - h - 1][w] == '#':
                U[H - h - 1][w] = 0
                continue
            if h == 0:
                U[H - h - 1][w] = 1
            else:
                U[H - h - 1][w] = U[H - h][w] + 1

    ans = 0
    for h in range(H):
        for w in range(W):
            ans = max(ans, R[h][w] + L[h][w] + D[h][w] + U[h][w] - 3)
    print(ans)


if __name__ == '__main__':
    H, W = map(int, input().split())
    Si = [input() for _ in range(H)]

    # # test
    # import func
    # H, W = 2000, 2000
    # Si = [''.join([func.random_str(W, '.')]) for _ in range(H)]
    # for s in Si:
    #     print(s)
    solve(H, W, Si)
