H,W = map(int,input().split())
s = [input() for _ in range(H)]
ans = [[-1 for w in range(W)] for h in range(H)]
ans0 = ans[:]
for h in range(H):
    sh = s[h]
    st = -1
    gl = -1
    cnt = 0
    for w in range(W):
        if sh[w] == '.':
            cnt += 1
            if st == -1:
                st,gl = w,w
            gl +=1
            if w == W-1:
                for i in range(st,w+1):
                    ans[h][i] += cnt
        else:
            for i in range(st,gl):
                ans[h][i] += cnt
            cnt = 0
            st,gl = -1,-1
#print(*ans,sep='\n')
#ans1 = ans[:]
#ans = [[0 for w in range(W)] for h in range(H)]
for w in range(W):
    st = -1
    gl = -1
    cnt = 0
    for h in range(H):
        if s[h][w] == '.':
            cnt += 1
            if st == -1:
                st,gl = h,h
            gl +=1
            if h == H-1:
                for i in range(st,h+1):
                    ans[i][w] += cnt
        else:
            for i in range(st,gl):
                ans[i][w] += cnt
            cnt = 0
            st,gl = -1,-1
#print(*ans,sep='\n')
mx = 0
for x in ans:
    mx = max(max(x),mx)
print(mx) H,W = map(int,input().split()) H map(int,input().split()) map int input().split() ().split () input split W input() for _ in range(H) for _ in range(H) _ range(H) range H for _ in range(H) input() input s = [input() for _ in range(H)] s [input() for _ in range(H)] [-1 for w in range(W)] for h in range(H) for h in range(H) h range(H) range H for h in range(H) [-1 for w in range(W)] ans = [[-1 for w in range(W)] for h in range(H)] ans [[-1 for w in range(W)] for h in range(H)] ans0 = ans[:] ans0 ans[:] ans : for h in range(H):
    sh = s[h]
    st = -1
    gl = -1
    cnt = 0
    for w in range(W):
        if sh[w] == '.':
            cnt += 1
            if st == -1:
                st,gl = w,w
            gl +=1
            if w == W-1:
                for i in range(st,w+1):
                    ans[h][i] += cnt
        else:
            for i in range(st,gl):
                ans[h][i] += cnt
            cnt = 0
            st,gl = -1,-1
#print(*ans,sep='\n')
#ans1 = ans[:]
#ans = [[0 for w in range(W)] for h in range(H)] h range(H) range H sh = s[h] sh s[h] s h st = -1 st -1 gl = -1 gl -1 cnt = 0 cnt 0 for w in range(W):
        if sh[w] == '.':
            cnt += 1
            if st == -1:
                st,gl = w,w
            gl +=1
            if w == W-1:
                for i in range(st,w+1):
                    ans[h][i] += cnt
        else:
            for i in range(st,gl):
                ans[h][i] += cnt
            cnt = 0
            st,gl = -1,-1
#print(*ans,sep='\n')
#ans1 = ans[:]
#ans = [[0 for w in range(W)] for h in range(H)] w range(W) range W if sh[w] == '.':
            cnt += 1
            if st == -1:
                st,gl = w,w
            gl +=1
            if w == W-1:
                for i in range(st,w+1):
                    ans[h][i] += cnt
        else:
            for i in range(st,gl):
                ans[h][i] += cnt
            cnt = 0
            st,gl = -1,-1
#print(*ans,sep='\n')
#ans1 = ans[:]
#ans = [[0 for w in range(W)] for h in range(H)] sh[w] == '.' sh[w] sh w '.' cnt += 1 cnt 1 if st == -1:
                st,gl = w,w
             st == -1 st -1 st,gl = w,w st w gl w gl +=1 gl 1 if w == W-1:
                for i in range(st,w+1):
                    ans[h][i] += cnt
         w == W-1 w W-1 W 1 for i in range(st,w+1):
                    ans[h][i] += cnt
         i range(st,w+1) range st w+1 w 1 ans[h][i] += cnt ans[h][i] [h] ans h i cnt for i in range(st,gl):
                ans[h][i] += cnt
             i range(st,gl) range st gl ans[h][i] += cnt ans[h][i] [h] ans h i cnt cnt = 0 cnt 0 st,gl = -1,-1 st -1 gl -1 for w in range(W):
    st = -1
    gl = -1
    cnt = 0
    for h in range(H):
        if s[h][w] == '.':
            cnt += 1
            if st == -1:
                st,gl = h,h
            gl +=1
            if h == H-1:
                for i in range(st,h+1):
                    ans[i][w] += cnt
        else:
            for i in range(st,gl):
                ans[i][w] += cnt
            cnt = 0
            st,gl = -1,-1
#print(*ans,sep='\n') w range(W) range W st = -1 st -1 gl = -1 gl -1 cnt = 0 cnt 0 for h in range(H):
        if s[h][w] == '.':
            cnt += 1
            if st == -1:
                st,gl = h,h
            gl +=1
            if h == H-1:
                for i in range(st,h+1):
                    ans[i][w] += cnt
        else:
            for i in range(st,gl):
                ans[i][w] += cnt
            cnt = 0
            st,gl = -1,-1
#print(*ans,sep='\n') h range(H) range H if s[h][w] == '.':
            cnt += 1
            if st == -1:
                st,gl = h,h
            gl +=1
            if h == H-1:
                for i in range(st,h+1):
                    ans[i][w] += cnt
        else:
            for i in range(st,gl):
                ans[i][w] += cnt
            cnt = 0
            st,gl = -1,-1
#print(*ans,sep='\n') s[h][w] == '.' s[h][w] [h] s h w '.' cnt += 1 cnt 1 if st == -1:
                st,gl = h,h
             st == -1 st -1 st,gl = h,h st h gl h gl +=1 gl 1 if h == H-1:
                for i in range(st,h+1):
                    ans[i][w] += cnt
         h == H-1 h H-1 H 1 for i in range(st,h+1):
                    ans[i][w] += cnt
         i range(st,h+1) range st h+1 h 1 ans[i][w] += cnt ans[i][w] [i] ans i w cnt for i in range(st,gl):
                ans[i][w] += cnt
             i range(st,gl) range st gl ans[i][w] += cnt ans[i][w] [i] ans i w cnt cnt = 0 cnt 0 st,gl = -1,-1 st -1 gl -1 mx = 0 mx 0 for x in ans:
    mx = max(max(x),mx) x ans mx = max(max(x),mx) mx max(max(x),mx) max max(x) max x mx print(mx) print mx gl = -1,-1 -1 gl gl +=1 1 gl mx = 0 0 mx cnt = 0 0 cnt st,gl = h,h h st gl = w,w w gl st,gl = -1,-1 -1 st H,W = map(int,input().split()) map(int,input().split()) H gl +=1 1 gl st,gl = -1,-1 -1 st cnt = 0 0 cnt st,gl = w,w w st W = map(int,input().split()) map(int,input().split()) W st = -1 -1 st ans0 = ans[:] ans[:] ans0 ans = [[-1 for w in range(W)] for h in range(H)] [[-1 for w in range(W)] for h in range(H)] ans cnt = 0 0 cnt cnt = 0 0 cnt s = [input() for _ in range(H)] [input() for _ in range(H)] s cnt += 1 1 cnt gl = -1 -1 gl gl = -1,-1 -1 gl gl = -1 -1 gl cnt += 1 1 cnt gl = h,h h gl sh = s[h] s[h] sh mx = max(max(x),mx) max(max(x),mx) mx st = -1 -1 st
H,W = map(int,input().split())
s = [input() for _ in range(H)]
ans = [[-1 for w in range(W)] for h in range(H)]
ans0 = ans[:]
for h in range(H):
    sh = s[h]
    st = -1
    gl = -1
    cnt = 0
    for w in range(W):
        if sh[w] == '.':
            cnt += 1
            if st == -1:
                st,gl = w,w
            gl +=1
            if w == W-1:
                for i in range(st,w+1):
                    ans[h][i] += cnt
        else:
            for i in range(st,gl):
                ans[h][i] += cnt
            cnt = 0
            st,gl = -1,-1
#print(*ans,sep='\n')
#ans1 = ans[:]
#ans = [[0 for w in range(W)] for h in range(H)]
for w in range(W):
    st = -1
    gl = -1
    cnt = 0
    for h in range(H):
        if s[h][w] == '.':
            cnt += 1
            if st == -1:
                st,gl = h,h
            gl +=1
            if h == H-1:
                for i in range(st,h+1):
                    ans[i][w] += cnt
        else:
            for i in range(st,gl):
                ans[i][w] += cnt
            cnt = 0
            st,gl = -1,-1
#print(*ans,sep='\n')
mx = 0
for x in ans:
    mx = max(max(x),mx)
print(mx)