# import sys
# sys.setrecursionlimit(10 ** 6)
# import bisect
# from collections import deque
# from decorator import stop_watch
# 
# 
# @stop_watch
def solve(H, W, Si):
    Si = ['#' * (W + 2)] + ['#' + S + '#' for S in Si] + ['#' * (W + 2)]
    lamp_map = [[[-1, -1] for _ in range(W + 2)] for _ in range(H + 2)]
    ans = 0
    for h in range(1, H + 2):
        for w in range(1, W + 2):
            # block
            if Si[h][w] == '#':
                lamp_map[h][w][0] = 0
                lamp_map[h][w][1] = 0
                continue
            # vertical
            if lamp_map[h - 1][w][0] > 0:
                lamp_map[h][w][0] = lamp_map[h - 1][w][0]
            else:
                tmp = 0
                while Si[h + tmp][w] == '.':
                    tmp += 1
                lamp_map[h][w][0] = tmp
            # horizon
            if lamp_map[h][w - 1][1] > 0:
                lamp_map[h][w][1] = lamp_map[h][w - 1][1]
            else:
                tmp = 0
                while Si[h][w + tmp] == '.':
                    tmp += 1
                lamp_map[h][w][1] = tmp
            ans = max(ans, sum(lamp_map[h][w]) - 1)
    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):
    Si = ['#' * (W + 2)] + ['#' + S + '#' for S in Si] + ['#' * (W + 2)]
    lamp_map = [[[-1, -1] for _ in range(W + 2)] for _ in range(H + 2)]
    ans = 0
    for h in range(1, H + 2):
        for w in range(1, W + 2):
            # block
            if Si[h][w] == '#':
                lamp_map[h][w][0] = 0
                lamp_map[h][w][1] = 0
                continue
            # vertical
            if lamp_map[h - 1][w][0] > 0:
                lamp_map[h][w][0] = lamp_map[h - 1][w][0]
            else:
                tmp = 0
                while Si[h + tmp][w] == '.':
                    tmp += 1
                lamp_map[h][w][0] = tmp
            # horizon
            if lamp_map[h][w - 1][1] > 0:
                lamp_map[h][w][1] = lamp_map[h][w - 1][1]
            else:
                tmp = 0
                while Si[h][w + tmp] == '.':
                    tmp += 1
                lamp_map[h][w][1] = tmp
            ans = max(ans, sum(lamp_map[h][w]) - 1)
    print(ans) solve '#' + S + '#' for S in Si for S in Si S Si for S in Si '#' + S + '#' '#' + S '#' S '#' Si = ['#' * (W + 2)] + ['#' + S + '#' for S in Si] + ['#' * (W + 2)] Si ['#' * (W + 2)] + ['#' + S + '#' for S in Si] + ['#' * (W + 2)] ['#' * (W + 2)] + ['#' + S + '#' for S in Si] ['#' * (W + 2)] '#' * (W + 2) '#' W + 2 W 2 ['#' + S + '#' for S in Si] ['#' * (W + 2)] '#' * (W + 2) '#' W + 2 W 2 [[-1, -1] for _ in range(W + 2)] for _ in range(H + 2) for _ in range(H + 2) _ range(H + 2) range H + 2 H 2 for _ in range(H + 2) [[-1, -1] for _ in range(W + 2)] lamp_map = [[[-1, -1] for _ in range(W + 2)] for _ in range(H + 2)] lamp_map [[[-1, -1] for _ in range(W + 2)] for _ in range(H + 2)] ans = 0 ans 0 for h in range(1, H + 2):
        for w in range(1, W + 2):
            # block
            if Si[h][w] == '#':
                lamp_map[h][w][0] = 0
                lamp_map[h][w][1] = 0
                continue
            # vertical
            if lamp_map[h - 1][w][0] > 0:
                lamp_map[h][w][0] = lamp_map[h - 1][w][0]
            else:
                tmp = 0
                while Si[h + tmp][w] == '.':
                    tmp += 1
                lamp_map[h][w][0] = tmp
            # horizon
            if lamp_map[h][w - 1][1] > 0:
                lamp_map[h][w][1] = lamp_map[h][w - 1][1]
            else:
                tmp = 0
                while Si[h][w + tmp] == '.':
                    tmp += 1
                lamp_map[h][w][1] = tmp
            ans = max(ans, sum(lamp_map[h][w]) - 1)
     h range(1, H + 2) range 1 H + 2 H 2 for w in range(1, W + 2):
            # block
            if Si[h][w] == '#':
                lamp_map[h][w][0] = 0
                lamp_map[h][w][1] = 0
                continue
            # vertical
            if lamp_map[h - 1][w][0] > 0:
                lamp_map[h][w][0] = lamp_map[h - 1][w][0]
            else:
                tmp = 0
                while Si[h + tmp][w] == '.':
                    tmp += 1
                lamp_map[h][w][0] = tmp
            # horizon
            if lamp_map[h][w - 1][1] > 0:
                lamp_map[h][w][1] = lamp_map[h][w - 1][1]
            else:
                tmp = 0
                while Si[h][w + tmp] == '.':
                    tmp += 1
                lamp_map[h][w][1] = tmp
            ans = max(ans, sum(lamp_map[h][w]) - 1)
     w range(1, W + 2) range 1 W + 2 W 2 if Si[h][w] == '#':
                lamp_map[h][w][0] = 0
                lamp_map[h][w][1] = 0
                continue
            # vertical
             Si[h][w] == '#' Si[h][w] [h] Si h w '#' lamp_map[h][w][0] = 0 lamp_map[h][w][0] [w] [h] lamp_map h w 0 0 lamp_map[h][w][1] = 0 lamp_map[h][w][1] [w] [h] lamp_map h w 1 0 continue if lamp_map[h - 1][w][0] > 0:
                lamp_map[h][w][0] = lamp_map[h - 1][w][0]
            else:
                tmp = 0
                while Si[h + tmp][w] == '.':
                    tmp += 1
                lamp_map[h][w][0] = tmp
            # horizon
             lamp_map[h - 1][w][0] > 0 lamp_map[h - 1][w][0] [w] [h - 1] lamp_map h - 1 h 1 w 0 0 lamp_map[h][w][0] = lamp_map[h - 1][w][0] lamp_map[h][w][0] [w] [h] lamp_map h w 0 lamp_map[h - 1][w][0] [w] [h - 1] lamp_map h - 1 h 1 w 0 tmp = 0 tmp 0 while Si[h + tmp][w] == '.':
                    tmp += 1
                 Si[h + tmp][w] == '.' Si[h + tmp][w] [h + tmp] Si h + tmp h tmp w '.' tmp += 1 tmp 1 lamp_map[h][w][0] = tmp lamp_map[h][w][0] [w] [h] lamp_map h w 0 tmp if lamp_map[h][w - 1][1] > 0:
                lamp_map[h][w][1] = lamp_map[h][w - 1][1]
            else:
                tmp = 0
                while Si[h][w + tmp] == '.':
                    tmp += 1
                lamp_map[h][w][1] = tmp
             lamp_map[h][w - 1][1] > 0 lamp_map[h][w - 1][1] [w - 1] [h] lamp_map h w - 1 w 1 1 0 lamp_map[h][w][1] = lamp_map[h][w - 1][1] lamp_map[h][w][1] [w] [h] lamp_map h w 1 lamp_map[h][w - 1][1] [w - 1] [h] lamp_map h w - 1 w 1 1 tmp = 0 tmp 0 while Si[h][w + tmp] == '.':
                    tmp += 1
                 Si[h][w + tmp] == '.' Si[h][w + tmp] [h] Si h w + tmp w tmp '.' tmp += 1 tmp 1 lamp_map[h][w][1] = tmp lamp_map[h][w][1] [w] [h] lamp_map h w 1 tmp ans = max(ans, sum(lamp_map[h][w]) - 1) ans max(ans, sum(lamp_map[h][w]) - 1) max ans sum(lamp_map[h][w]) - 1 sum(lamp_map[h][w]) sum lamp_map[h][w] [h] lamp_map h w 1 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 def solve(H, W, Si):
    Si = ['#' * (W + 2)] + ['#' + S + '#' for S in Si] + ['#' * (W + 2)]
    lamp_map = [[[-1, -1] for _ in range(W + 2)] for _ in range(H + 2)]
    ans = 0
    for h in range(1, H + 2):
        for w in range(1, W + 2):
            # block
            if Si[h][w] == '#':
                lamp_map[h][w][0] = 0
                lamp_map[h][w][1] = 0
                continue
            # vertical
            if lamp_map[h - 1][w][0] > 0:
                lamp_map[h][w][0] = lamp_map[h - 1][w][0]
            else:
                tmp = 0
                while Si[h + tmp][w] == '.':
                    tmp += 1
                lamp_map[h][w][0] = tmp
            # horizon
            if lamp_map[h][w - 1][1] > 0:
                lamp_map[h][w][1] = lamp_map[h][w - 1][1]
            else:
                tmp = 0
                while Si[h][w + tmp] == '.':
                    tmp += 1
                lamp_map[h][w][1] = tmp
            ans = max(ans, sum(lamp_map[h][w]) - 1)
    print(ans) def solve(H, W, Si):
    Si = ['#' * (W + 2)] + ['#' + S + '#' for S in Si] + ['#' * (W + 2)]
    lamp_map = [[[-1, -1] for _ in range(W + 2)] for _ in range(H + 2)]
    ans = 0
    for h in range(1, H + 2):
        for w in range(1, W + 2):
            # block
            if Si[h][w] == '#':
                lamp_map[h][w][0] = 0
                lamp_map[h][w][1] = 0
                continue
            # vertical
            if lamp_map[h - 1][w][0] > 0:
                lamp_map[h][w][0] = lamp_map[h - 1][w][0]
            else:
                tmp = 0
                while Si[h + tmp][w] == '.':
                    tmp += 1
                lamp_map[h][w][0] = tmp
            # horizon
            if lamp_map[h][w - 1][1] > 0:
                lamp_map[h][w][1] = lamp_map[h][w - 1][1]
            else:
                tmp = 0
                while Si[h][w + tmp] == '.':
                    tmp += 1
                lamp_map[h][w][1] = tmp
            ans = max(ans, sum(lamp_map[h][w]) - 1)
    print(ans) solve H, W = map(int, input().split()) map(int, input().split()) H 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):
    Si = ['#' * (W + 2)] + ['#' + S + '#' for S in Si] + ['#' * (W + 2)]
    lamp_map = [[[-1, -1] for _ in range(W + 2)] for _ in range(H + 2)]
    ans = 0
    for h in range(1, H + 2):
        for w in range(1, W + 2):
            # block
            if Si[h][w] == '#':
                lamp_map[h][w][0] = 0
                lamp_map[h][w][1] = 0
                continue
            # vertical
            if lamp_map[h - 1][w][0] > 0:
                lamp_map[h][w][0] = lamp_map[h - 1][w][0]
            else:
                tmp = 0
                while Si[h + tmp][w] == '.':
                    tmp += 1
                lamp_map[h][w][0] = tmp
            # horizon
            if lamp_map[h][w - 1][1] > 0:
                lamp_map[h][w][1] = lamp_map[h][w - 1][1]
            else:
                tmp = 0
                while Si[h][w + tmp] == '.':
                    tmp += 1
                lamp_map[h][w][1] = tmp
            ans = max(ans, sum(lamp_map[h][w]) - 1)
    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)
