h, w = map(int, input().split())
lst = [[0] for _ in range(h)]
for i in range(h):
    tmp = list(input())
    lst[i] = tmp

H = [[0] * w for _ in range(h)]
W = [[0] * w for _ in range(h)]

for i in range(h):
    done = [0] * w
    for j in range(w):
        if lst[i][j] == '#':
            continue
        if done[j]:
            continue
        k = 0
        while lst[i][j+k] != '#':
            done[j+k] = 1
            k += 1  # kが照らせるマスの長さ
            if j+k > w-1:
                break
        for l in range(k):
            H[i][j+l] = k


for j in range(w):
    done = [0] * h
    for i in range(h):
        if lst[i][j] == '#':
            continue
        if done[i]:
            continue
        k = 0
        while lst[i+k][j] != '#':
            done[i+k] = 1
            k += 1  # kが照らせるマスの長さ
            if i+k > h-1:
                break
        for l in range(k):
            W[i+l][j] = k

ans = 0
for i in range(h):
    for j in range(w):
        if lst[i][j] != '#':
            ans = max(ans, H[i][j] + W[i][j] - 1)

print(ans) h, w = map(int, input().split()) h map(int, input().split()) map int input().split() ().split () input split w [0] for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) [0] 0 lst = [[0] for _ in range(h)] lst [[0] for _ in range(h)] for i in range(h):
    tmp = list(input())
    lst[i] = tmp i range(h) range h tmp = list(input()) tmp list(input()) list input() input lst[i] = tmp lst[i] lst i tmp [0] * w for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) [0] * w [0] 0 w H = [[0] * w for _ in range(h)] H [[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 W = [[0] * w for _ in range(h)] W [[0] * w for _ in range(h)] for i in range(h):
    done = [0] * w
    for j in range(w):
        if lst[i][j] == '#':
            continue
        if done[j]:
            continue
        k = 0
        while lst[i][j+k] != '#':
            done[j+k] = 1
            k += 1  # kが照らせるマスの長さ
            if j+k > w-1:
                break
        for l in range(k):
            H[i][j+l] = k i range(h) range h done = [0] * w done [0] * w [0] 0 w for j in range(w):
        if lst[i][j] == '#':
            continue
        if done[j]:
            continue
        k = 0
        while lst[i][j+k] != '#':
            done[j+k] = 1
            k += 1  # kが照らせるマスの長さ
            if j+k > w-1:
                break
        for l in range(k):
            H[i][j+l] = k j range(w) range w if lst[i][j] == '#':
            continue
         lst[i][j] == '#' lst[i][j] [i] lst i j '#' continue if done[j]:
            continue
         done[j] done j continue k = 0 k 0 while lst[i][j+k] != '#':
            done[j+k] = 1
            k += 1  # kが照らせるマスの長さ
            if j+k > w-1:
                break
         lst[i][j+k] != '#' lst[i][j+k] [i] lst i j+k j k '#' done[j+k] = 1 done[j+k] done j+k j k 1 k += 1 k 1 if j+k > w-1:
                break
         j+k > w-1 j+k j k w-1 w 1 break for l in range(k):
            H[i][j+l] = k l range(k) range k H[i][j+l] = k H[i][j+l] [i] H i j+l j l k for j in range(w):
    done = [0] * h
    for i in range(h):
        if lst[i][j] == '#':
            continue
        if done[i]:
            continue
        k = 0
        while lst[i+k][j] != '#':
            done[i+k] = 1
            k += 1  # kが照らせるマスの長さ
            if i+k > h-1:
                break
        for l in range(k):
            W[i+l][j] = k j range(w) range w done = [0] * h done [0] * h [0] 0 h for i in range(h):
        if lst[i][j] == '#':
            continue
        if done[i]:
            continue
        k = 0
        while lst[i+k][j] != '#':
            done[i+k] = 1
            k += 1  # kが照らせるマスの長さ
            if i+k > h-1:
                break
        for l in range(k):
            W[i+l][j] = k i range(h) range h if lst[i][j] == '#':
            continue
         lst[i][j] == '#' lst[i][j] [i] lst i j '#' continue if done[i]:
            continue
         done[i] done i continue k = 0 k 0 while lst[i+k][j] != '#':
            done[i+k] = 1
            k += 1  # kが照らせるマスの長さ
            if i+k > h-1:
                break
         lst[i+k][j] != '#' lst[i+k][j] [i+k] lst i+k i k j '#' done[i+k] = 1 done[i+k] done i+k i k 1 k += 1 k 1 if i+k > h-1:
                break
         i+k > h-1 i+k i k h-1 h 1 break for l in range(k):
            W[i+l][j] = k l range(k) range k W[i+l][j] = k W[i+l][j] [i+l] W i+l i l j k ans = 0 ans 0 for i in range(h):
    for j in range(w):
        if lst[i][j] != '#':
            ans = max(ans, H[i][j] + W[i][j] - 1) i range(h) range h for j in range(w):
        if lst[i][j] != '#':
            ans = max(ans, H[i][j] + W[i][j] - 1) j range(w) range w if lst[i][j] != '#':
            ans = max(ans, H[i][j] + W[i][j] - 1) lst[i][j] != '#' lst[i][j] [i] lst i j '#' ans = max(ans, H[i][j] + W[i][j] - 1) ans max(ans, H[i][j] + W[i][j] - 1) max ans H[i][j] + W[i][j] - 1 H[i][j] + W[i][j] H[i][j] [i] H i j W[i][j] [i] W i j 1 print(ans) print ans tmp = list(input()) list(input()) tmp w = map(int, input().split()) map(int, input().split()) w k = 0 0 k lst = [[0] for _ in range(h)] [[0] for _ in range(h)] lst H = [[0] * w for _ in range(h)] [[0] * w for _ in range(h)] H done = [0] * h [0] * h done ans = 0 0 ans k = 0 0 k k += 1 1 k W = [[0] * w for _ in range(h)] [[0] * w for _ in range(h)] W h, w = map(int, input().split()) map(int, input().split()) h k += 1 1 k ans = max(ans, H[i][j] + W[i][j] - 1) max(ans, H[i][j] + W[i][j] - 1) ans done = [0] * w [0] * w done
h, w = map(int, input().split())
lst = [[0] for _ in range(h)]
for i in range(h):
    tmp = list(input())
    lst[i] = tmp

H = [[0] * w for _ in range(h)]
W = [[0] * w for _ in range(h)]

for i in range(h):
    done = [0] * w
    for j in range(w):
        if lst[i][j] == '#':
            continue
        if done[j]:
            continue
        k = 0
        while lst[i][j+k] != '#':
            done[j+k] = 1
            k += 1  # kが照らせるマスの長さ
            if j+k > w-1:
                break
        for l in range(k):
            H[i][j+l] = k


for j in range(w):
    done = [0] * h
    for i in range(h):
        if lst[i][j] == '#':
            continue
        if done[i]:
            continue
        k = 0
        while lst[i+k][j] != '#':
            done[i+k] = 1
            k += 1  # kが照らせるマスの長さ
            if i+k > h-1:
                break
        for l in range(k):
            W[i+l][j] = k

ans = 0
for i in range(h):
    for j in range(w):
        if lst[i][j] != '#':
            ans = max(ans, H[i][j] + W[i][j] - 1)

print(ans)