h, w = map(int, input().split())
G = []
l_w = [[0] * w for i in range(h)]
l_h = [[0] * w for i in range(h)]
for i in range(h):
    G.append(input())
for i in range(h):
    cnt = 0
    for j in range(w):
        if G[i][j] == ".":
            cnt += 1
            l_w[i][j] = cnt
        else:
            cnt = 0
    tmp = 0
    for j in range(w - 1, -1, -1):
        if l_w[i][j] > 0 and tmp == 0:
            tmp = l_w[i][j]
        elif l_w[i][j] > 0 and tmp > 0:
            l_w[i][j] = tmp
        elif l_w[i][j] == 0 and tmp > 0:
            tmp = 0
for i in range(w):
    cnt = 0
    for j in range(h):
        if G[j][i] == ".":
            cnt += 1
            l_h[j][i] = cnt
        else:
            cnt = 0
    tmp = 0
    for j in range(h - 1, -1, -1):
        if l_h[j][i] > 0 and tmp == 0:
            tmp = l_h[j][i]
        elif l_h[j][i] > 0 and tmp > 0:
            l_h[j][i] = tmp
        elif l_h[j][i] == 0 and tmp > 0:
            tmp = 0
ans = 0
for i in range(h):
    for j in range(w):
        ans = max(ans, l_w[i][j] + l_h[i][j] - 1)
print(ans) h, w = map(int, input().split()) h map(int, input().split()) map int input().split() ().split () input split w G = [] G [] [0] * w for i in range(h) for i in range(h) i range(h) range h for i in range(h) [0] * w [0] 0 w l_w = [[0] * w for i in range(h)] l_w [[0] * w for i in range(h)] [0] * w for i in range(h) for i in range(h) i range(h) range h for i in range(h) [0] * w [0] 0 w l_h = [[0] * w for i in range(h)] l_h [[0] * w for i in range(h)] for i in range(h):
    G.append(input()) i range(h) range h G.append(input()) G.append G append input() input for i in range(h):
    cnt = 0
    for j in range(w):
        if G[i][j] == ".":
            cnt += 1
            l_w[i][j] = cnt
        else:
            cnt = 0
    tmp = 0
    for j in range(w - 1, -1, -1):
        if l_w[i][j] > 0 and tmp == 0:
            tmp = l_w[i][j]
        elif l_w[i][j] > 0 and tmp > 0:
            l_w[i][j] = tmp
        elif l_w[i][j] == 0 and tmp > 0:
            tmp = 0 i range(h) range h cnt = 0 cnt 0 for j in range(w):
        if G[i][j] == ".":
            cnt += 1
            l_w[i][j] = cnt
        else:
            cnt = 0
     j range(w) range w if G[i][j] == ".":
            cnt += 1
            l_w[i][j] = cnt
        else:
            cnt = 0
     G[i][j] == "." G[i][j] [i] G i j "." cnt += 1 cnt 1 l_w[i][j] = cnt l_w[i][j] [i] l_w i j cnt cnt = 0 cnt 0 tmp = 0 tmp 0 for j in range(w - 1, -1, -1):
        if l_w[i][j] > 0 and tmp == 0:
            tmp = l_w[i][j]
        elif l_w[i][j] > 0 and tmp > 0:
            l_w[i][j] = tmp
        elif l_w[i][j] == 0 and tmp > 0:
            tmp = 0 j range(w - 1, -1, -1) range w - 1 w 1 -1 -1 if l_w[i][j] > 0 and tmp == 0:
            tmp = l_w[i][j]
        elif l_w[i][j] > 0 and tmp > 0:
            l_w[i][j] = tmp
        elif l_w[i][j] == 0 and tmp > 0:
            tmp = 0 l_w[i][j] > 0 and tmp == 0 l_w[i][j] > 0 l_w[i][j] [i] l_w i j 0 tmp == 0 tmp 0 tmp = l_w[i][j] tmp l_w[i][j] [i] l_w i j elif l_w[i][j] > 0 and tmp > 0:
            l_w[i][j] = tmp
         l_w[i][j] > 0 and tmp > 0 l_w[i][j] > 0 l_w[i][j] [i] l_w i j 0 tmp > 0 tmp 0 l_w[i][j] = tmp l_w[i][j] [i] l_w i j tmp elif l_w[i][j] == 0 and tmp > 0:
            tmp = 0 l_w[i][j] == 0 and tmp > 0 l_w[i][j] == 0 l_w[i][j] [i] l_w i j 0 tmp > 0 tmp 0 tmp = 0 tmp 0 for i in range(w):
    cnt = 0
    for j in range(h):
        if G[j][i] == ".":
            cnt += 1
            l_h[j][i] = cnt
        else:
            cnt = 0
    tmp = 0
    for j in range(h - 1, -1, -1):
        if l_h[j][i] > 0 and tmp == 0:
            tmp = l_h[j][i]
        elif l_h[j][i] > 0 and tmp > 0:
            l_h[j][i] = tmp
        elif l_h[j][i] == 0 and tmp > 0:
            tmp = 0 i range(w) range w cnt = 0 cnt 0 for j in range(h):
        if G[j][i] == ".":
            cnt += 1
            l_h[j][i] = cnt
        else:
            cnt = 0
     j range(h) range h if G[j][i] == ".":
            cnt += 1
            l_h[j][i] = cnt
        else:
            cnt = 0
     G[j][i] == "." G[j][i] [j] G j i "." cnt += 1 cnt 1 l_h[j][i] = cnt l_h[j][i] [j] l_h j i cnt cnt = 0 cnt 0 tmp = 0 tmp 0 for j in range(h - 1, -1, -1):
        if l_h[j][i] > 0 and tmp == 0:
            tmp = l_h[j][i]
        elif l_h[j][i] > 0 and tmp > 0:
            l_h[j][i] = tmp
        elif l_h[j][i] == 0 and tmp > 0:
            tmp = 0 j range(h - 1, -1, -1) range h - 1 h 1 -1 -1 if l_h[j][i] > 0 and tmp == 0:
            tmp = l_h[j][i]
        elif l_h[j][i] > 0 and tmp > 0:
            l_h[j][i] = tmp
        elif l_h[j][i] == 0 and tmp > 0:
            tmp = 0 l_h[j][i] > 0 and tmp == 0 l_h[j][i] > 0 l_h[j][i] [j] l_h j i 0 tmp == 0 tmp 0 tmp = l_h[j][i] tmp l_h[j][i] [j] l_h j i elif l_h[j][i] > 0 and tmp > 0:
            l_h[j][i] = tmp
         l_h[j][i] > 0 and tmp > 0 l_h[j][i] > 0 l_h[j][i] [j] l_h j i 0 tmp > 0 tmp 0 l_h[j][i] = tmp l_h[j][i] [j] l_h j i tmp elif l_h[j][i] == 0 and tmp > 0:
            tmp = 0 l_h[j][i] == 0 and tmp > 0 l_h[j][i] == 0 l_h[j][i] [j] l_h j i 0 tmp > 0 tmp 0 tmp = 0 tmp 0 ans = 0 ans 0 for i in range(h):
    for j in range(w):
        ans = max(ans, l_w[i][j] + l_h[i][j] - 1) i range(h) range h for j in range(w):
        ans = max(ans, l_w[i][j] + l_h[i][j] - 1) j range(w) range w ans = max(ans, l_w[i][j] + l_h[i][j] - 1) ans max(ans, l_w[i][j] + l_h[i][j] - 1) max ans l_w[i][j] + l_h[i][j] - 1 l_w[i][j] + l_h[i][j] l_w[i][j] [i] l_w i j l_h[i][j] [i] l_h i j 1 print(ans) print ans tmp = 0 0 tmp w = map(int, input().split()) map(int, input().split()) w ans = max(ans, l_w[i][j] + l_h[i][j] - 1) max(ans, l_w[i][j] + l_h[i][j] - 1) ans l_w = [[0] * w for i in range(h)] [[0] * w for i in range(h)] l_w G = [] [] G h, w = map(int, input().split()) map(int, input().split()) h cnt += 1 1 cnt tmp = 0 0 tmp cnt = 0 0 cnt tmp = 0 0 tmp tmp = l_h[j][i] l_h[j][i] tmp l_h = [[0] * w for i in range(h)] [[0] * w for i in range(h)] l_h cnt += 1 1 cnt ans = 0 0 ans tmp = l_w[i][j] l_w[i][j] tmp cnt = 0 0 cnt cnt = 0 0 cnt cnt = 0 0 cnt tmp = 0 0 tmp
h, w = map(int, input().split())
G = []
l_w = [[0] * w for i in range(h)]
l_h = [[0] * w for i in range(h)]
for i in range(h):
    G.append(input())
for i in range(h):
    cnt = 0
    for j in range(w):
        if G[i][j] == ".":
            cnt += 1
            l_w[i][j] = cnt
        else:
            cnt = 0
    tmp = 0
    for j in range(w - 1, -1, -1):
        if l_w[i][j] > 0 and tmp == 0:
            tmp = l_w[i][j]
        elif l_w[i][j] > 0 and tmp > 0:
            l_w[i][j] = tmp
        elif l_w[i][j] == 0 and tmp > 0:
            tmp = 0
for i in range(w):
    cnt = 0
    for j in range(h):
        if G[j][i] == ".":
            cnt += 1
            l_h[j][i] = cnt
        else:
            cnt = 0
    tmp = 0
    for j in range(h - 1, -1, -1):
        if l_h[j][i] > 0 and tmp == 0:
            tmp = l_h[j][i]
        elif l_h[j][i] > 0 and tmp > 0:
            l_h[j][i] = tmp
        elif l_h[j][i] == 0 and tmp > 0:
            tmp = 0
ans = 0
for i in range(h):
    for j in range(w):
        ans = max(ans, l_w[i][j] + l_h[i][j] - 1)
print(ans)