import sys
# sys.setrecursionlimit(100000)


def input():
    return sys.stdin.readline().strip()


def input_int():
    return int(input())


def input_int_list():
    return [int(i) for i in input().split()]


def main():
    h, w = input_int_list()
    grid = []
    for i in range(h):
        grid.append(list(input()))

    ver_cnt = [[None for _ in range(w)] for _ in range(h)]
    hor_cnt = [[None for _ in range(w)] for _ in range(h)]

    for i in range(h):
        for j in range(w):
            if grid[i][j] == ".":
                # 横方向の数を埋める
                if not hor_cnt[i][j]:
                    j_end = j
                    cnt = 0
                    while j_end < w:
                        if grid[i][j_end] == "#":
                            break
                        else:
                            j_end += 1
                            cnt += 1
                    for _j in range(j, j_end):
                        hor_cnt[i][_j] = cnt
                # 縦方向の数を埋める
                if not ver_cnt[i][j]:
                    i_end = i
                    cnt = 0
                    while i_end < h:
                        if grid[i_end][j] == "#":
                            break
                        else:
                            i_end += 1
                            cnt += 1
                    for _i in range(i, i_end):
                        ver_cnt[_i][j] = cnt
    ans = 0

    for i in range(h):
        for j in range(w):
            if grid[i][j] != "#":
                ans = max(ans, ver_cnt[i][j] + hor_cnt[i][j] - 1)
    print(ans)


if __name__ == "__main__":
    main() import sys sys def input():
    return sys.stdin.readline().strip() input return sys.stdin.readline().strip() sys.stdin.readline().strip() sys.stdin.readline().strip sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline strip def input_int():
    return int(input()) input_int return int(input()) int(input()) int input() input def input_int_list():
    return [int(i) for i in input().split()] input_int_list int(i) for i in input().split() for i in input().split() i input().split() ().split () input split for i in input().split() int(i) int i return [int(i) for i in input().split()] [int(i) for i in input().split()] def main():
    h, w = input_int_list()
    grid = []
    for i in range(h):
        grid.append(list(input()))

    ver_cnt = [[None for _ in range(w)] for _ in range(h)]
    hor_cnt = [[None for _ in range(w)] for _ in range(h)]

    for i in range(h):
        for j in range(w):
            if grid[i][j] == ".":
                # 横方向の数を埋める
                if not hor_cnt[i][j]:
                    j_end = j
                    cnt = 0
                    while j_end < w:
                        if grid[i][j_end] == "#":
                            break
                        else:
                            j_end += 1
                            cnt += 1
                    for _j in range(j, j_end):
                        hor_cnt[i][_j] = cnt
                # 縦方向の数を埋める
                if not ver_cnt[i][j]:
                    i_end = i
                    cnt = 0
                    while i_end < h:
                        if grid[i_end][j] == "#":
                            break
                        else:
                            i_end += 1
                            cnt += 1
                    for _i in range(i, i_end):
                        ver_cnt[_i][j] = cnt
    ans = 0

    for i in range(h):
        for j in range(w):
            if grid[i][j] != "#":
                ans = max(ans, ver_cnt[i][j] + hor_cnt[i][j] - 1)
    print(ans) main h, w = input_int_list() h input_int_list() input_int_list w grid = [] grid [] for i in range(h):
        grid.append(list(input()))

     i range(h) range h grid.append(list(input())) grid.append grid append list(input()) list input() input [None for _ in range(w)] for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) [None for _ in range(w)] ver_cnt = [[None for _ in range(w)] for _ in range(h)] ver_cnt [[None for _ in range(w)] for _ in range(h)] [None for _ in range(w)] for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) [None for _ in range(w)] hor_cnt = [[None for _ in range(w)] for _ in range(h)] hor_cnt [[None for _ in range(w)] for _ in range(h)] for i in range(h):
        for j in range(w):
            if grid[i][j] == ".":
                # 横方向の数を埋める
                if not hor_cnt[i][j]:
                    j_end = j
                    cnt = 0
                    while j_end < w:
                        if grid[i][j_end] == "#":
                            break
                        else:
                            j_end += 1
                            cnt += 1
                    for _j in range(j, j_end):
                        hor_cnt[i][_j] = cnt
                # 縦方向の数を埋める
                if not ver_cnt[i][j]:
                    i_end = i
                    cnt = 0
                    while i_end < h:
                        if grid[i_end][j] == "#":
                            break
                        else:
                            i_end += 1
                            cnt += 1
                    for _i in range(i, i_end):
                        ver_cnt[_i][j] = cnt
     i range(h) range h for j in range(w):
            if grid[i][j] == ".":
                # 横方向の数を埋める
                if not hor_cnt[i][j]:
                    j_end = j
                    cnt = 0
                    while j_end < w:
                        if grid[i][j_end] == "#":
                            break
                        else:
                            j_end += 1
                            cnt += 1
                    for _j in range(j, j_end):
                        hor_cnt[i][_j] = cnt
                # 縦方向の数を埋める
                if not ver_cnt[i][j]:
                    i_end = i
                    cnt = 0
                    while i_end < h:
                        if grid[i_end][j] == "#":
                            break
                        else:
                            i_end += 1
                            cnt += 1
                    for _i in range(i, i_end):
                        ver_cnt[_i][j] = cnt
     j range(w) range w if grid[i][j] == ".":
                # 横方向の数を埋める
                if not hor_cnt[i][j]:
                    j_end = j
                    cnt = 0
                    while j_end < w:
                        if grid[i][j_end] == "#":
                            break
                        else:
                            j_end += 1
                            cnt += 1
                    for _j in range(j, j_end):
                        hor_cnt[i][_j] = cnt
                # 縦方向の数を埋める
                if not ver_cnt[i][j]:
                    i_end = i
                    cnt = 0
                    while i_end < h:
                        if grid[i_end][j] == "#":
                            break
                        else:
                            i_end += 1
                            cnt += 1
                    for _i in range(i, i_end):
                        ver_cnt[_i][j] = cnt
     grid[i][j] == "." grid[i][j] [i] grid i j "." if not hor_cnt[i][j]:
                    j_end = j
                    cnt = 0
                    while j_end < w:
                        if grid[i][j_end] == "#":
                            break
                        else:
                            j_end += 1
                            cnt += 1
                    for _j in range(j, j_end):
                        hor_cnt[i][_j] = cnt
                # 縦方向の数を埋める
                 not hor_cnt[i][j] hor_cnt[i][j] [i] hor_cnt i j j_end = j j_end j cnt = 0 cnt 0 while j_end < w:
                        if grid[i][j_end] == "#":
                            break
                        else:
                            j_end += 1
                            cnt += 1
                     j_end < w j_end w if grid[i][j_end] == "#":
                            break
                        else:
                            j_end += 1
                            cnt += 1
                     grid[i][j_end] == "#" grid[i][j_end] [i] grid i j_end "#" break j_end += 1 j_end 1 cnt += 1 cnt 1 for _j in range(j, j_end):
                        hor_cnt[i][_j] = cnt
                # 縦方向の数を埋める
                 _j range(j, j_end) range j j_end hor_cnt[i][_j] = cnt hor_cnt[i][_j] [i] hor_cnt i _j cnt if not ver_cnt[i][j]:
                    i_end = i
                    cnt = 0
                    while i_end < h:
                        if grid[i_end][j] == "#":
                            break
                        else:
                            i_end += 1
                            cnt += 1
                    for _i in range(i, i_end):
                        ver_cnt[_i][j] = cnt
     not ver_cnt[i][j] ver_cnt[i][j] [i] ver_cnt i j i_end = i i_end i cnt = 0 cnt 0 while i_end < h:
                        if grid[i_end][j] == "#":
                            break
                        else:
                            i_end += 1
                            cnt += 1
                     i_end < h i_end h if grid[i_end][j] == "#":
                            break
                        else:
                            i_end += 1
                            cnt += 1
                     grid[i_end][j] == "#" grid[i_end][j] [i_end] grid i_end j "#" break i_end += 1 i_end 1 cnt += 1 cnt 1 for _i in range(i, i_end):
                        ver_cnt[_i][j] = cnt
     _i range(i, i_end) range i i_end ver_cnt[_i][j] = cnt ver_cnt[_i][j] [_i] ver_cnt _i j cnt ans = 0 ans 0 for i in range(h):
        for j in range(w):
            if grid[i][j] != "#":
                ans = max(ans, ver_cnt[i][j] + hor_cnt[i][j] - 1)
     i range(h) range h for j in range(w):
            if grid[i][j] != "#":
                ans = max(ans, ver_cnt[i][j] + hor_cnt[i][j] - 1)
     j range(w) range w if grid[i][j] != "#":
                ans = max(ans, ver_cnt[i][j] + hor_cnt[i][j] - 1)
     grid[i][j] != "#" grid[i][j] [i] grid i j "#" ans = max(ans, ver_cnt[i][j] + hor_cnt[i][j] - 1) ans max(ans, ver_cnt[i][j] + hor_cnt[i][j] - 1) max ans ver_cnt[i][j] + hor_cnt[i][j] - 1 ver_cnt[i][j] + hor_cnt[i][j] ver_cnt[i][j] [i] ver_cnt i j hor_cnt[i][j] [i] hor_cnt i j 1 print(ans) print ans if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    h, w = input_int_list()
    grid = []
    for i in range(h):
        grid.append(list(input()))

    ver_cnt = [[None for _ in range(w)] for _ in range(h)]
    hor_cnt = [[None for _ in range(w)] for _ in range(h)]

    for i in range(h):
        for j in range(w):
            if grid[i][j] == ".":
                # 横方向の数を埋める
                if not hor_cnt[i][j]:
                    j_end = j
                    cnt = 0
                    while j_end < w:
                        if grid[i][j_end] == "#":
                            break
                        else:
                            j_end += 1
                            cnt += 1
                    for _j in range(j, j_end):
                        hor_cnt[i][_j] = cnt
                # 縦方向の数を埋める
                if not ver_cnt[i][j]:
                    i_end = i
                    cnt = 0
                    while i_end < h:
                        if grid[i_end][j] == "#":
                            break
                        else:
                            i_end += 1
                            cnt += 1
                    for _i in range(i, i_end):
                        ver_cnt[_i][j] = cnt
    ans = 0

    for i in range(h):
        for j in range(w):
            if grid[i][j] != "#":
                ans = max(ans, ver_cnt[i][j] + hor_cnt[i][j] - 1)
    print(ans) def main():
    h, w = input_int_list()
    grid = []
    for i in range(h):
        grid.append(list(input()))

    ver_cnt = [[None for _ in range(w)] for _ in range(h)]
    hor_cnt = [[None for _ in range(w)] for _ in range(h)]

    for i in range(h):
        for j in range(w):
            if grid[i][j] == ".":
                # 横方向の数を埋める
                if not hor_cnt[i][j]:
                    j_end = j
                    cnt = 0
                    while j_end < w:
                        if grid[i][j_end] == "#":
                            break
                        else:
                            j_end += 1
                            cnt += 1
                    for _j in range(j, j_end):
                        hor_cnt[i][_j] = cnt
                # 縦方向の数を埋める
                if not ver_cnt[i][j]:
                    i_end = i
                    cnt = 0
                    while i_end < h:
                        if grid[i_end][j] == "#":
                            break
                        else:
                            i_end += 1
                            cnt += 1
                    for _i in range(i, i_end):
                        ver_cnt[_i][j] = cnt
    ans = 0

    for i in range(h):
        for j in range(w):
            if grid[i][j] != "#":
                ans = max(ans, ver_cnt[i][j] + hor_cnt[i][j] - 1)
    print(ans) main def input():
    return sys.stdin.readline().strip() def input():
    return sys.stdin.readline().strip() input def input_int():
    return int(input()) def input_int():
    return int(input()) input_int def input_int_list():
    return [int(i) for i in input().split()] def input_int_list():
    return [int(i) for i in input().split()] input_int_list
import sys
# sys.setrecursionlimit(100000)


def input():
    return sys.stdin.readline().strip()


def input_int():
    return int(input())


def input_int_list():
    return [int(i) for i in input().split()]


def main():
    h, w = input_int_list()
    grid = []
    for i in range(h):
        grid.append(list(input()))

    ver_cnt = [[None for _ in range(w)] for _ in range(h)]
    hor_cnt = [[None for _ in range(w)] for _ in range(h)]

    for i in range(h):
        for j in range(w):
            if grid[i][j] == ".":
                # 横方向の数を埋める
                if not hor_cnt[i][j]:
                    j_end = j
                    cnt = 0
                    while j_end < w:
                        if grid[i][j_end] == "#":
                            break
                        else:
                            j_end += 1
                            cnt += 1
                    for _j in range(j, j_end):
                        hor_cnt[i][_j] = cnt
                # 縦方向の数を埋める
                if not ver_cnt[i][j]:
                    i_end = i
                    cnt = 0
                    while i_end < h:
                        if grid[i_end][j] == "#":
                            break
                        else:
                            i_end += 1
                            cnt += 1
                    for _i in range(i, i_end):
                        ver_cnt[_i][j] = cnt
    ans = 0

    for i in range(h):
        for j in range(w):
            if grid[i][j] != "#":
                ans = max(ans, ver_cnt[i][j] + hor_cnt[i][j] - 1)
    print(ans)


if __name__ == "__main__":
    main()
