H, W = map(int, input().split())
s = []
for i in range(H):
    s.append(input())
ans = 0
ls = [[0 for i in range(W)] for j in range(H)]
for i, x in enumerate(s):
    cur = 1
    for j, y in enumerate(x):
        if y == '.':
            ls[i][j] += cur
            cur += 1
        else:
            ls[i][j] = 0
            cur = 1
    cur = 1
    for j, y in enumerate(x[::-1]):
        if y == '.':
            ls[i][W-j-1] += cur
            cur += 1
        else:
            ls[i][W-j-1] = 0
            cur = 1
for i in range(W):
    cur = 1
    for j in range(H):
        if s[j][i] == '.':
            ls[j][i] += cur
            cur += 1
        else:
            ls[j][i] = 0
            cur = 1
    cur = 1
    for j in range(H):
        if s[H-j-1][i] == '.':
            ls[H-j-1][i] += cur
            cur += 1
        else:
            ls[H-j-1][i] = 0
            cur = 1
for x in ls:
    for y in x:
        ans = max(ans, y)
print(ans-3) H, W = map(int, input().split()) H map(int, input().split()) map int input().split() ().split () input split W s = [] s [] for i in range(H):
    s.append(input()) i range(H) range H s.append(input()) s.append s append input() input ans = 0 ans 0 [0 for i in range(W)] for j in range(H) for j in range(H) j range(H) range H for j in range(H) [0 for i in range(W)] ls = [[0 for i in range(W)] for j in range(H)] ls [[0 for i in range(W)] for j in range(H)] for i, x in enumerate(s):
    cur = 1
    for j, y in enumerate(x):
        if y == '.':
            ls[i][j] += cur
            cur += 1
        else:
            ls[i][j] = 0
            cur = 1
    cur = 1
    for j, y in enumerate(x[::-1]):
        if y == '.':
            ls[i][W-j-1] += cur
            cur += 1
        else:
            ls[i][W-j-1] = 0
            cur = 1 i x enumerate(s) enumerate s cur = 1 cur 1 for j, y in enumerate(x):
        if y == '.':
            ls[i][j] += cur
            cur += 1
        else:
            ls[i][j] = 0
            cur = 1
     j y enumerate(x) enumerate x if y == '.':
            ls[i][j] += cur
            cur += 1
        else:
            ls[i][j] = 0
            cur = 1
     y == '.' y '.' ls[i][j] += cur ls[i][j] [i] ls i j cur cur += 1 cur 1 ls[i][j] = 0 ls[i][j] [i] ls i j 0 cur = 1 cur 1 cur = 1 cur 1 for j, y in enumerate(x[::-1]):
        if y == '.':
            ls[i][W-j-1] += cur
            cur += 1
        else:
            ls[i][W-j-1] = 0
            cur = 1 j y enumerate(x[::-1]) enumerate x[::-1] x ::-1 -1 if y == '.':
            ls[i][W-j-1] += cur
            cur += 1
        else:
            ls[i][W-j-1] = 0
            cur = 1 y == '.' y '.' ls[i][W-j-1] += cur ls[i][W-j-1] [i] ls i W-j-1 W-j W j 1 cur cur += 1 cur 1 ls[i][W-j-1] = 0 ls[i][W-j-1] [i] ls i W-j-1 W-j W j 1 0 cur = 1 cur 1 for i in range(W):
    cur = 1
    for j in range(H):
        if s[j][i] == '.':
            ls[j][i] += cur
            cur += 1
        else:
            ls[j][i] = 0
            cur = 1
    cur = 1
    for j in range(H):
        if s[H-j-1][i] == '.':
            ls[H-j-1][i] += cur
            cur += 1
        else:
            ls[H-j-1][i] = 0
            cur = 1 i range(W) range W cur = 1 cur 1 for j in range(H):
        if s[j][i] == '.':
            ls[j][i] += cur
            cur += 1
        else:
            ls[j][i] = 0
            cur = 1
     j range(H) range H if s[j][i] == '.':
            ls[j][i] += cur
            cur += 1
        else:
            ls[j][i] = 0
            cur = 1
     s[j][i] == '.' s[j][i] [j] s j i '.' ls[j][i] += cur ls[j][i] [j] ls j i cur cur += 1 cur 1 ls[j][i] = 0 ls[j][i] [j] ls j i 0 cur = 1 cur 1 cur = 1 cur 1 for j in range(H):
        if s[H-j-1][i] == '.':
            ls[H-j-1][i] += cur
            cur += 1
        else:
            ls[H-j-1][i] = 0
            cur = 1 j range(H) range H if s[H-j-1][i] == '.':
            ls[H-j-1][i] += cur
            cur += 1
        else:
            ls[H-j-1][i] = 0
            cur = 1 s[H-j-1][i] == '.' s[H-j-1][i] [H-j-1] s H-j-1 H-j H j 1 i '.' ls[H-j-1][i] += cur ls[H-j-1][i] [H-j-1] ls H-j-1 H-j H j 1 i cur cur += 1 cur 1 ls[H-j-1][i] = 0 ls[H-j-1][i] [H-j-1] ls H-j-1 H-j H j 1 i 0 cur = 1 cur 1 for x in ls:
    for y in x:
        ans = max(ans, y) x ls for y in x:
        ans = max(ans, y) y x ans = max(ans, y) ans max(ans, y) max ans y print(ans-3) print ans-3 ans 3 cur += 1 1 cur cur = 1 1 cur cur = 1 1 cur cur = 1 1 cur s = [] [] s cur += 1 1 cur ans = 0 0 ans H, W = map(int, input().split()) map(int, input().split()) H ls = [[0 for i in range(W)] for j in range(H)] [[0 for i in range(W)] for j in range(H)] ls cur = 1 1 cur W = map(int, input().split()) map(int, input().split()) W cur = 1 1 cur cur += 1 1 cur cur += 1 1 cur cur = 1 1 cur cur = 1 1 cur cur = 1 1 cur ans = max(ans, y) max(ans, y) ans
H, W = map(int, input().split())
s = []
for i in range(H):
    s.append(input())
ans = 0
ls = [[0 for i in range(W)] for j in range(H)]
for i, x in enumerate(s):
    cur = 1
    for j, y in enumerate(x):
        if y == '.':
            ls[i][j] += cur
            cur += 1
        else:
            ls[i][j] = 0
            cur = 1
    cur = 1
    for j, y in enumerate(x[::-1]):
        if y == '.':
            ls[i][W-j-1] += cur
            cur += 1
        else:
            ls[i][W-j-1] = 0
            cur = 1
for i in range(W):
    cur = 1
    for j in range(H):
        if s[j][i] == '.':
            ls[j][i] += cur
            cur += 1
        else:
            ls[j][i] = 0
            cur = 1
    cur = 1
    for j in range(H):
        if s[H-j-1][i] == '.':
            ls[H-j-1][i] += cur
            cur += 1
        else:
            ls[H-j-1][i] = 0
            cur = 1
for x in ls:
    for y in x:
        ans = max(ans, y)
print(ans-3)