h, w = list(map(int, input().split()))
s = [list(map(str, list(input()))) for i in range(h)]  # 文字列の二次元配列入力
yoko = [[] for _ in range(h)]
tate = [[] for _ in range(w)]
for i in range(h):
    cnt = 0
    for j in range(w):
        if j == w-1:
            if s[i][j] == '.':
                cnt += 1
                yoko[i] += [cnt] * (cnt)
            else:
                yoko[i] += [cnt] * (cnt)
                yoko[i].append(0)
        else:
            if s[i][j] == '.':
                cnt += 1
            else:
                yoko[i] += [cnt] * (cnt)
                yoko[i].append(0)
                cnt = 0

for i in range(w):
    cnt = 0
    for j in range(h):
        if j == h-1:
            if s[j][i] == '.':
                cnt += 1
                tate[i] += [cnt] * (cnt)
            else:
                tate[i] += [cnt] * (cnt)
                tate[i].append(0)
        else:
            if s[j][i] == '.':
                cnt += 1
            else:
                tate[i] += [cnt] * (cnt)
                tate[i].append(0)
                cnt = 0

ans = -1
for i in range(h):
    for j in range(w):
        ans = max(ans, yoko[i][j]+tate[j][i]-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 list(map(str, list(input()))) for i in range(h) for i in range(h) i range(h) range h for i in range(h) list(map(str, list(input()))) list map(str, list(input())) map str list(input()) list input() input s = [list(map(str, list(input()))) for i in range(h)] s [list(map(str, list(input()))) for i in range(h)] [] for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) [] yoko = [[] for _ in range(h)] yoko [[] for _ in range(h)] [] for _ in range(w) for _ in range(w) _ range(w) range w for _ in range(w) [] tate = [[] for _ in range(w)] tate [[] for _ in range(w)] for i in range(h):
    cnt = 0
    for j in range(w):
        if j == w-1:
            if s[i][j] == '.':
                cnt += 1
                yoko[i] += [cnt] * (cnt)
            else:
                yoko[i] += [cnt] * (cnt)
                yoko[i].append(0)
        else:
            if s[i][j] == '.':
                cnt += 1
            else:
                yoko[i] += [cnt] * (cnt)
                yoko[i].append(0)
                cnt = 0 i range(h) range h cnt = 0 cnt 0 for j in range(w):
        if j == w-1:
            if s[i][j] == '.':
                cnt += 1
                yoko[i] += [cnt] * (cnt)
            else:
                yoko[i] += [cnt] * (cnt)
                yoko[i].append(0)
        else:
            if s[i][j] == '.':
                cnt += 1
            else:
                yoko[i] += [cnt] * (cnt)
                yoko[i].append(0)
                cnt = 0 j range(w) range w if j == w-1:
            if s[i][j] == '.':
                cnt += 1
                yoko[i] += [cnt] * (cnt)
            else:
                yoko[i] += [cnt] * (cnt)
                yoko[i].append(0)
        else:
            if s[i][j] == '.':
                cnt += 1
            else:
                yoko[i] += [cnt] * (cnt)
                yoko[i].append(0)
                cnt = 0 j == w-1 j w-1 w 1 if s[i][j] == '.':
                cnt += 1
                yoko[i] += [cnt] * (cnt)
            else:
                yoko[i] += [cnt] * (cnt)
                yoko[i].append(0)
         s[i][j] == '.' s[i][j] [i] s i j '.' cnt += 1 cnt 1 yoko[i] += [cnt] * (cnt) yoko[i] yoko i [cnt] * (cnt) [cnt] cnt cnt yoko[i] += [cnt] * (cnt) yoko[i] yoko i [cnt] * (cnt) [cnt] cnt cnt yoko[i].append(0) [i].append [i] yoko i append 0 if s[i][j] == '.':
                cnt += 1
            else:
                yoko[i] += [cnt] * (cnt)
                yoko[i].append(0)
                cnt = 0 s[i][j] == '.' s[i][j] [i] s i j '.' cnt += 1 cnt 1 yoko[i] += [cnt] * (cnt) yoko[i] yoko i [cnt] * (cnt) [cnt] cnt cnt yoko[i].append(0) [i].append [i] yoko i append 0 cnt = 0 cnt 0 for i in range(w):
    cnt = 0
    for j in range(h):
        if j == h-1:
            if s[j][i] == '.':
                cnt += 1
                tate[i] += [cnt] * (cnt)
            else:
                tate[i] += [cnt] * (cnt)
                tate[i].append(0)
        else:
            if s[j][i] == '.':
                cnt += 1
            else:
                tate[i] += [cnt] * (cnt)
                tate[i].append(0)
                cnt = 0 i range(w) range w cnt = 0 cnt 0 for j in range(h):
        if j == h-1:
            if s[j][i] == '.':
                cnt += 1
                tate[i] += [cnt] * (cnt)
            else:
                tate[i] += [cnt] * (cnt)
                tate[i].append(0)
        else:
            if s[j][i] == '.':
                cnt += 1
            else:
                tate[i] += [cnt] * (cnt)
                tate[i].append(0)
                cnt = 0 j range(h) range h if j == h-1:
            if s[j][i] == '.':
                cnt += 1
                tate[i] += [cnt] * (cnt)
            else:
                tate[i] += [cnt] * (cnt)
                tate[i].append(0)
        else:
            if s[j][i] == '.':
                cnt += 1
            else:
                tate[i] += [cnt] * (cnt)
                tate[i].append(0)
                cnt = 0 j == h-1 j h-1 h 1 if s[j][i] == '.':
                cnt += 1
                tate[i] += [cnt] * (cnt)
            else:
                tate[i] += [cnt] * (cnt)
                tate[i].append(0)
         s[j][i] == '.' s[j][i] [j] s j i '.' cnt += 1 cnt 1 tate[i] += [cnt] * (cnt) tate[i] tate i [cnt] * (cnt) [cnt] cnt cnt tate[i] += [cnt] * (cnt) tate[i] tate i [cnt] * (cnt) [cnt] cnt cnt tate[i].append(0) [i].append [i] tate i append 0 if s[j][i] == '.':
                cnt += 1
            else:
                tate[i] += [cnt] * (cnt)
                tate[i].append(0)
                cnt = 0 s[j][i] == '.' s[j][i] [j] s j i '.' cnt += 1 cnt 1 tate[i] += [cnt] * (cnt) tate[i] tate i [cnt] * (cnt) [cnt] cnt cnt tate[i].append(0) [i].append [i] tate i append 0 cnt = 0 cnt 0 ans = -1 ans -1 for i in range(h):
    for j in range(w):
        ans = max(ans, yoko[i][j]+tate[j][i]-1) i range(h) range h for j in range(w):
        ans = max(ans, yoko[i][j]+tate[j][i]-1) j range(w) range w ans = max(ans, yoko[i][j]+tate[j][i]-1) ans max(ans, yoko[i][j]+tate[j][i]-1) max ans yoko[i][j]+tate[j][i]-1 yoko[i][j]+tate[j][i] yoko[i][j] [i] yoko i j tate[j][i] [j] tate j i 1 print(ans) print ans cnt = 0 0 cnt cnt += 1 1 cnt cnt = 0 0 cnt cnt += 1 1 cnt tate = [[] for _ in range(w)] [[] for _ in range(w)] tate h, w = list(map(int, input().split())) list(map(int, input().split())) h w = list(map(int, input().split())) list(map(int, input().split())) w cnt = 0 0 cnt cnt += 1 1 cnt yoko = [[] for _ in range(h)] [[] for _ in range(h)] yoko cnt = 0 0 cnt s = [list(map(str, list(input()))) for i in range(h)] [list(map(str, list(input()))) for i in range(h)] s cnt += 1 1 cnt ans = -1 -1 ans ans = max(ans, yoko[i][j]+tate[j][i]-1) max(ans, yoko[i][j]+tate[j][i]-1) ans
h, w = list(map(int, input().split()))
s = [list(map(str, list(input()))) for i in range(h)]  # 文字列の二次元配列入力
yoko = [[] for _ in range(h)]
tate = [[] for _ in range(w)]
for i in range(h):
    cnt = 0
    for j in range(w):
        if j == w-1:
            if s[i][j] == '.':
                cnt += 1
                yoko[i] += [cnt] * (cnt)
            else:
                yoko[i] += [cnt] * (cnt)
                yoko[i].append(0)
        else:
            if s[i][j] == '.':
                cnt += 1
            else:
                yoko[i] += [cnt] * (cnt)
                yoko[i].append(0)
                cnt = 0

for i in range(w):
    cnt = 0
    for j in range(h):
        if j == h-1:
            if s[j][i] == '.':
                cnt += 1
                tate[i] += [cnt] * (cnt)
            else:
                tate[i] += [cnt] * (cnt)
                tate[i].append(0)
        else:
            if s[j][i] == '.':
                cnt += 1
            else:
                tate[i] += [cnt] * (cnt)
                tate[i].append(0)
                cnt = 0

ans = -1
for i in range(h):
    for j in range(w):
        ans = max(ans, yoko[i][j]+tate[j][i]-1)
print(ans)
