H, W = list(map(int, input().split()))
maps = [['']*(W+2) for _ in range(H+2)]
maps[0] = ['#']*(W+2)
for i in range(H):
    maps[i+1] = ['#']+list(input())+['#']
maps[H+1] = ['#']*(W+2)

ans = 0
L = [[[0, 0] for _ in range(W)] for _ in range(H)]
for i in range(H):
    for j in range(W):
        if maps[i+1][j+1] == '#':
            continue
        if j >= 1 and L[i][j-1][1] > 0:
            L[i][j][1] = L[i][j-1][1]
        else:
            u = j+1
            while maps[i+1][u] == '.':
                u += 1
            L[i][j][1] = u-j-1
        if i >= 1 and L[i-1][j][0] > 0:
            L[i][j][0] = L[i-1][j][0]
        else:
            u = i+1
            while maps[u][j+1] == '.':
                u += 1
            L[i][j][0] = u-i-1
        ans = max(ans, L[i][j][0]+L[i][j][1]-1)
print(ans) H, W = list(map(int, input().split())) H list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split W ['']*(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) ['']*(W+2) [''] '' W+2 W 2 maps = [['']*(W+2) for _ in range(H+2)] maps [['']*(W+2) for _ in range(H+2)] maps[0] = ['#']*(W+2) maps[0] maps 0 ['#']*(W+2) ['#'] '#' W+2 W 2 for i in range(H):
    maps[i+1] = ['#']+list(input())+['#'] i range(H) range H maps[i+1] = ['#']+list(input())+['#'] maps[i+1] maps i+1 i 1 ['#']+list(input())+['#'] ['#']+list(input()) ['#'] '#' list(input()) list input() input ['#'] '#' maps[H+1] = ['#']*(W+2) maps[H+1] maps H+1 H 1 ['#']*(W+2) ['#'] '#' W+2 W 2 ans = 0 ans 0 [[0, 0] for _ in range(W)] for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) [[0, 0] for _ in range(W)] L = [[[0, 0] for _ in range(W)] for _ in range(H)] L [[[0, 0] for _ in range(W)] for _ in range(H)] for i in range(H):
    for j in range(W):
        if maps[i+1][j+1] == '#':
            continue
        if j >= 1 and L[i][j-1][1] > 0:
            L[i][j][1] = L[i][j-1][1]
        else:
            u = j+1
            while maps[i+1][u] == '.':
                u += 1
            L[i][j][1] = u-j-1
        if i >= 1 and L[i-1][j][0] > 0:
            L[i][j][0] = L[i-1][j][0]
        else:
            u = i+1
            while maps[u][j+1] == '.':
                u += 1
            L[i][j][0] = u-i-1
        ans = max(ans, L[i][j][0]+L[i][j][1]-1) i range(H) range H for j in range(W):
        if maps[i+1][j+1] == '#':
            continue
        if j >= 1 and L[i][j-1][1] > 0:
            L[i][j][1] = L[i][j-1][1]
        else:
            u = j+1
            while maps[i+1][u] == '.':
                u += 1
            L[i][j][1] = u-j-1
        if i >= 1 and L[i-1][j][0] > 0:
            L[i][j][0] = L[i-1][j][0]
        else:
            u = i+1
            while maps[u][j+1] == '.':
                u += 1
            L[i][j][0] = u-i-1
        ans = max(ans, L[i][j][0]+L[i][j][1]-1) j range(W) range W if maps[i+1][j+1] == '#':
            continue
         maps[i+1][j+1] == '#' maps[i+1][j+1] [i+1] maps i+1 i 1 j+1 j 1 '#' continue if j >= 1 and L[i][j-1][1] > 0:
            L[i][j][1] = L[i][j-1][1]
        else:
            u = j+1
            while maps[i+1][u] == '.':
                u += 1
            L[i][j][1] = u-j-1
         j >= 1 and L[i][j-1][1] > 0 j >= 1 j 1 L[i][j-1][1] > 0 L[i][j-1][1] [j-1] [i] L i j-1 j 1 1 0 L[i][j][1] = L[i][j-1][1] L[i][j][1] [j] [i] L i j 1 L[i][j-1][1] [j-1] [i] L i j-1 j 1 1 u = j+1 u j+1 j 1 while maps[i+1][u] == '.':
                u += 1
             maps[i+1][u] == '.' maps[i+1][u] [i+1] maps i+1 i 1 u '.' u += 1 u 1 L[i][j][1] = u-j-1 L[i][j][1] [j] [i] L i j 1 u-j-1 u-j u j 1 if i >= 1 and L[i-1][j][0] > 0:
            L[i][j][0] = L[i-1][j][0]
        else:
            u = i+1
            while maps[u][j+1] == '.':
                u += 1
            L[i][j][0] = u-i-1
         i >= 1 and L[i-1][j][0] > 0 i >= 1 i 1 L[i-1][j][0] > 0 L[i-1][j][0] [j] [i-1] L i-1 i 1 j 0 0 L[i][j][0] = L[i-1][j][0] L[i][j][0] [j] [i] L i j 0 L[i-1][j][0] [j] [i-1] L i-1 i 1 j 0 u = i+1 u i+1 i 1 while maps[u][j+1] == '.':
                u += 1
             maps[u][j+1] == '.' maps[u][j+1] [u] maps u j+1 j 1 '.' u += 1 u 1 L[i][j][0] = u-i-1 L[i][j][0] [j] [i] L i j 0 u-i-1 u-i u i 1 ans = max(ans, L[i][j][0]+L[i][j][1]-1) ans max(ans, L[i][j][0]+L[i][j][1]-1) max ans L[i][j][0]+L[i][j][1]-1 L[i][j][0]+L[i][j][1] L[i][j][0] [j] [i] L i j 0 L[i][j][1] [j] [i] L i j 1 1 print(ans) print ans L = [[[0, 0] for _ in range(W)] for _ in range(H)] [[[0, 0] for _ in range(W)] for _ in range(H)] L ans = max(ans, L[i][j][0]+L[i][j][1]-1) max(ans, L[i][j][0]+L[i][j][1]-1) ans u += 1 1 u u = j+1 j+1 u H, W = list(map(int, input().split())) list(map(int, input().split())) H ans = 0 0 ans u = i+1 i+1 u maps = [['']*(W+2) for _ in range(H+2)] [['']*(W+2) for _ in range(H+2)] maps W = list(map(int, input().split())) list(map(int, input().split())) W u += 1 1 u
H, W = list(map(int, input().split()))
maps = [['']*(W+2) for _ in range(H+2)]
maps[0] = ['#']*(W+2)
for i in range(H):
    maps[i+1] = ['#']+list(input())+['#']
maps[H+1] = ['#']*(W+2)

ans = 0
L = [[[0, 0] for _ in range(W)] for _ in range(H)]
for i in range(H):
    for j in range(W):
        if maps[i+1][j+1] == '#':
            continue
        if j >= 1 and L[i][j-1][1] > 0:
            L[i][j][1] = L[i][j-1][1]
        else:
            u = j+1
            while maps[i+1][u] == '.':
                u += 1
            L[i][j][1] = u-j-1
        if i >= 1 and L[i-1][j][0] > 0:
            L[i][j][0] = L[i-1][j][0]
        else:
            u = i+1
            while maps[u][j+1] == '.':
                u += 1
            L[i][j][0] = u-i-1
        ans = max(ans, L[i][j][0]+L[i][j][1]-1)
print(ans)