H,W = map(int,input().split())
S = [input().strip() for _ in range(H)]
X = [[0 for _ in range(W)] for _ in range(H)]
for i in range(H):
    j = 0
    cur = j
    while j<W:
        if S[i][j]==".":
            j += 1
        else:
            for k in range(cur,j):
                X[i][k] = j-cur
            j += 1
            cur = j
    for k in range(cur,W):
        X[i][k] = W-cur
Y = [[0 for _ in range(W)] for _ in range(H)]
for j in range(W):
    i = 0
    cur = i
    while i<H:
        if S[i][j]==".":
            i += 1
        else:
            for k in range(cur,i):
                Y[k][j] = i-cur
            i += 1
            cur = i
    for k in range(cur,H):
        Y[k][j] = H-cur
cmax = 0
for i in range(H):
    for j in range(W):
        if S[i][j]==".":
            cmax = max(cmax,X[i][j]+Y[i][j]-1)
print(cmax) H,W = map(int,input().split()) H map(int,input().split()) map int input().split() ().split () input split W input().strip() for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) input().strip() ().strip () input strip S = [input().strip() for _ in range(H)] S [input().strip() for _ in range(H)] [0 for _ in range(W)] for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) [0 for _ in range(W)] X = [[0 for _ in range(W)] for _ in range(H)] X [[0 for _ in range(W)] for _ in range(H)] for i in range(H):
    j = 0
    cur = j
    while j<W:
        if S[i][j]==".":
            j += 1
        else:
            for k in range(cur,j):
                X[i][k] = j-cur
            j += 1
            cur = j
    for k in range(cur,W):
        X[i][k] = W-cur i range(H) range H j = 0 j 0 cur = j cur j while j<W:
        if S[i][j]==".":
            j += 1
        else:
            for k in range(cur,j):
                X[i][k] = j-cur
            j += 1
            cur = j
     j<W j W if S[i][j]==".":
            j += 1
        else:
            for k in range(cur,j):
                X[i][k] = j-cur
            j += 1
            cur = j
     S[i][j]=="." S[i][j] [i] S i j "." j += 1 j 1 for k in range(cur,j):
                X[i][k] = j-cur
             k range(cur,j) range cur j X[i][k] = j-cur X[i][k] [i] X i k j-cur j cur j += 1 j 1 cur = j cur j for k in range(cur,W):
        X[i][k] = W-cur k range(cur,W) range cur W X[i][k] = W-cur X[i][k] [i] X i k W-cur W cur [0 for _ in range(W)] for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) [0 for _ in range(W)] Y = [[0 for _ in range(W)] for _ in range(H)] Y [[0 for _ in range(W)] for _ in range(H)] for j in range(W):
    i = 0
    cur = i
    while i<H:
        if S[i][j]==".":
            i += 1
        else:
            for k in range(cur,i):
                Y[k][j] = i-cur
            i += 1
            cur = i
    for k in range(cur,H):
        Y[k][j] = H-cur j range(W) range W i = 0 i 0 cur = i cur i while i<H:
        if S[i][j]==".":
            i += 1
        else:
            for k in range(cur,i):
                Y[k][j] = i-cur
            i += 1
            cur = i
     i<H i H if S[i][j]==".":
            i += 1
        else:
            for k in range(cur,i):
                Y[k][j] = i-cur
            i += 1
            cur = i
     S[i][j]=="." S[i][j] [i] S i j "." i += 1 i 1 for k in range(cur,i):
                Y[k][j] = i-cur
             k range(cur,i) range cur i Y[k][j] = i-cur Y[k][j] [k] Y k j i-cur i cur i += 1 i 1 cur = i cur i for k in range(cur,H):
        Y[k][j] = H-cur k range(cur,H) range cur H Y[k][j] = H-cur Y[k][j] [k] Y k j H-cur H cur cmax = 0 cmax 0 for i in range(H):
    for j in range(W):
        if S[i][j]==".":
            cmax = max(cmax,X[i][j]+Y[i][j]-1) i range(H) range H for j in range(W):
        if S[i][j]==".":
            cmax = max(cmax,X[i][j]+Y[i][j]-1) j range(W) range W if S[i][j]==".":
            cmax = max(cmax,X[i][j]+Y[i][j]-1) S[i][j]=="." S[i][j] [i] S i j "." cmax = max(cmax,X[i][j]+Y[i][j]-1) cmax max(cmax,X[i][j]+Y[i][j]-1) max cmax X[i][j]+Y[i][j]-1 X[i][j]+Y[i][j] X[i][j] [i] X i j Y[i][j] [i] Y i j 1 print(cmax) print cmax cmax = max(cmax,X[i][j]+Y[i][j]-1) max(cmax,X[i][j]+Y[i][j]-1) cmax H,W = map(int,input().split()) map(int,input().split()) H cmax = 0 0 cmax j = 0 0 j X = [[0 for _ in range(W)] for _ in range(H)] [[0 for _ in range(W)] for _ in range(H)] X cur = j j cur Y = [[0 for _ in range(W)] for _ in range(H)] [[0 for _ in range(W)] for _ in range(H)] Y cur = i i cur j += 1 1 j j += 1 1 j cur = i i cur i = 0 0 i cur = j j cur W = map(int,input().split()) map(int,input().split()) W i += 1 1 i i += 1 1 i S = [input().strip() for _ in range(H)] [input().strip() for _ in range(H)] S
H,W = map(int,input().split())
S = [input().strip() for _ in range(H)]
X = [[0 for _ in range(W)] for _ in range(H)]
for i in range(H):
    j = 0
    cur = j
    while j<W:
        if S[i][j]==".":
            j += 1
        else:
            for k in range(cur,j):
                X[i][k] = j-cur
            j += 1
            cur = j
    for k in range(cur,W):
        X[i][k] = W-cur
Y = [[0 for _ in range(W)] for _ in range(H)]
for j in range(W):
    i = 0
    cur = i
    while i<H:
        if S[i][j]==".":
            i += 1
        else:
            for k in range(cur,i):
                Y[k][j] = i-cur
            i += 1
            cur = i
    for k in range(cur,H):
        Y[k][j] = H-cur
cmax = 0
for i in range(H):
    for j in range(W):
        if S[i][j]==".":
            cmax = max(cmax,X[i][j]+Y[i][j]-1)
print(cmax)