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

row_list = [[0] * w for _ in range(h)]
for i in range(h):
    r = 0
    cnt = 0
    for l in range(w):
        if s[i][l] == '#':
            row_list[i][l] = 0
            r += 1
            cnt = 0
            continue

        while r < w and s[i][r] == '.':
            cnt += 1
            r += 1

        row_list[i][l] = cnt

col_list = [[0] * h for _ in range(w)]
for i in range(w):
    r = 0
    cnt = 0
    for l in range(h):
        if s[l][i] == '#':
            col_list[i][l] = 0
            r += 1
            cnt = 0
            continue

        while r < h and s[r][i] == '.':
            cnt += 1
            r += 1

        col_list[i][l] = cnt

res = 0
for i in range(h):
    for j in range(w):
        res = max(res, row_list[i][j] + col_list[j][i] - 1)

print(res) h, w = map(int, input().split()) h map(int, input().split()) map int input().split() ().split () input split w list(input()) for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) list(input()) list input() input s = [list(input()) for _ in range(h)] s [list(input()) 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 row_list = [[0] * w for _ in range(h)] row_list [[0] * w for _ in range(h)] for i in range(h):
    r = 0
    cnt = 0
    for l in range(w):
        if s[i][l] == '#':
            row_list[i][l] = 0
            r += 1
            cnt = 0
            continue

        while r < w and s[i][r] == '.':
            cnt += 1
            r += 1

        row_list[i][l] = cnt i range(h) range h r = 0 r 0 cnt = 0 cnt 0 for l in range(w):
        if s[i][l] == '#':
            row_list[i][l] = 0
            r += 1
            cnt = 0
            continue

        while r < w and s[i][r] == '.':
            cnt += 1
            r += 1

        row_list[i][l] = cnt l range(w) range w if s[i][l] == '#':
            row_list[i][l] = 0
            r += 1
            cnt = 0
            continue

         s[i][l] == '#' s[i][l] [i] s i l '#' row_list[i][l] = 0 row_list[i][l] [i] row_list i l 0 r += 1 r 1 cnt = 0 cnt 0 continue while r < w and s[i][r] == '.':
            cnt += 1
            r += 1

         r < w and s[i][r] == '.' r < w r w s[i][r] == '.' s[i][r] [i] s i r '.' cnt += 1 cnt 1 r += 1 r 1 row_list[i][l] = cnt row_list[i][l] [i] row_list i l cnt [0] * h for _ in range(w) for _ in range(w) _ range(w) range w for _ in range(w) [0] * h [0] 0 h col_list = [[0] * h for _ in range(w)] col_list [[0] * h for _ in range(w)] for i in range(w):
    r = 0
    cnt = 0
    for l in range(h):
        if s[l][i] == '#':
            col_list[i][l] = 0
            r += 1
            cnt = 0
            continue

        while r < h and s[r][i] == '.':
            cnt += 1
            r += 1

        col_list[i][l] = cnt i range(w) range w r = 0 r 0 cnt = 0 cnt 0 for l in range(h):
        if s[l][i] == '#':
            col_list[i][l] = 0
            r += 1
            cnt = 0
            continue

        while r < h and s[r][i] == '.':
            cnt += 1
            r += 1

        col_list[i][l] = cnt l range(h) range h if s[l][i] == '#':
            col_list[i][l] = 0
            r += 1
            cnt = 0
            continue

         s[l][i] == '#' s[l][i] [l] s l i '#' col_list[i][l] = 0 col_list[i][l] [i] col_list i l 0 r += 1 r 1 cnt = 0 cnt 0 continue while r < h and s[r][i] == '.':
            cnt += 1
            r += 1

         r < h and s[r][i] == '.' r < h r h s[r][i] == '.' s[r][i] [r] s r i '.' cnt += 1 cnt 1 r += 1 r 1 col_list[i][l] = cnt col_list[i][l] [i] col_list i l cnt res = 0 res 0 for i in range(h):
    for j in range(w):
        res = max(res, row_list[i][j] + col_list[j][i] - 1) i range(h) range h for j in range(w):
        res = max(res, row_list[i][j] + col_list[j][i] - 1) j range(w) range w res = max(res, row_list[i][j] + col_list[j][i] - 1) res max(res, row_list[i][j] + col_list[j][i] - 1) max res row_list[i][j] + col_list[j][i] - 1 row_list[i][j] + col_list[j][i] row_list[i][j] [i] row_list i j col_list[j][i] [j] col_list j i 1 print(res) print res row_list = [[0] * w for _ in range(h)] [[0] * w for _ in range(h)] row_list r += 1 1 r cnt = 0 0 cnt r = 0 0 r cnt += 1 1 cnt r += 1 1 r h, w = map(int, input().split()) map(int, input().split()) h cnt = 0 0 cnt cnt = 0 0 cnt r += 1 1 r w = map(int, input().split()) map(int, input().split()) w s = [list(input()) for _ in range(h)] [list(input()) for _ in range(h)] s r = 0 0 r col_list = [[0] * h for _ in range(w)] [[0] * h for _ in range(w)] col_list res = max(res, row_list[i][j] + col_list[j][i] - 1) max(res, row_list[i][j] + col_list[j][i] - 1) res r += 1 1 r res = 0 0 res cnt += 1 1 cnt cnt = 0 0 cnt
h, w = map(int, input().split())
s = [list(input()) for _ in range(h)]

row_list = [[0] * w for _ in range(h)]
for i in range(h):
    r = 0
    cnt = 0
    for l in range(w):
        if s[i][l] == '#':
            row_list[i][l] = 0
            r += 1
            cnt = 0
            continue

        while r < w and s[i][r] == '.':
            cnt += 1
            r += 1

        row_list[i][l] = cnt

col_list = [[0] * h for _ in range(w)]
for i in range(w):
    r = 0
    cnt = 0
    for l in range(h):
        if s[l][i] == '#':
            col_list[i][l] = 0
            r += 1
            cnt = 0
            continue

        while r < h and s[r][i] == '.':
            cnt += 1
            r += 1

        col_list[i][l] = cnt

res = 0
for i in range(h):
    for j in range(w):
        res = max(res, row_list[i][j] + col_list[j][i] - 1)

print(res)