h,w = map(int,input().split())
x = []
for i in range(h):
    x.append(input())

l = [[0]*w for i in range(h)]
r = [[0]*w for i in range(h)]
u = [[0]*w for i in range(h)]
d = [[0]*w for i in range(h)]

for i in range(h):
    c = 0
    for j in range(w):
        if x[i][j] == '.':
            l[i][j] = c
            c += 1
        else: c=0


for i in range(h):
    c = 0
    for j in range(w):
        if x[i][w-1-j] == '.':
            r[i][w-1-j] = c
            c += 1
        else: c=0

for i in range(w):
    c = 0
    for j in range(h):
        if x[j][i] == '.':
            u[j][i] = c
            c += 1
        else: c=0

for i in range(w):
    c = 0
    for j in range(h):
        if x[h-1-j][i] == '.':
            d[h-1-j][i] = c
            c += 1
        else: c=0

ans = 0
for i in range(h):
    for j in range(w):
        c = l[i][j]+r[i][j]+u[i][j]+d[i][j]
        if x[i][j]=='.':c+=1
        ans = max(ans,c)

print(ans) h,w = map(int,input().split()) h map(int,input().split()) map int input().split() ().split () input split w x = [] x [] for i in range(h):
    x.append(input()) i range(h) range h x.append(input()) x.append x append input() input [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 = [[0]*w for i in range(h)] l [[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 r = [[0]*w for i in range(h)] r [[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 u = [[0]*w for i in range(h)] u [[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 d = [[0]*w for i in range(h)] d [[0]*w for i in range(h)] for i in range(h):
    c = 0
    for j in range(w):
        if x[i][j] == '.':
            l[i][j] = c
            c += 1
        else: c=0 i range(h) range h c = 0 c 0 for j in range(w):
        if x[i][j] == '.':
            l[i][j] = c
            c += 1
        else: c=0 j range(w) range w if x[i][j] == '.':
            l[i][j] = c
            c += 1
        else: c=0 x[i][j] == '.' x[i][j] [i] x i j '.' l[i][j] = c l[i][j] [i] l i j c c += 1 c 1 for i in range(h):
    c = 0
    for j in range(w):
        if x[i][w-1-j] == '.':
            r[i][w-1-j] = c
            c += 1
        else: c=0 i range(h) range h c = 0 c 0 for j in range(w):
        if x[i][w-1-j] == '.':
            r[i][w-1-j] = c
            c += 1
        else: c=0 j range(w) range w if x[i][w-1-j] == '.':
            r[i][w-1-j] = c
            c += 1
        else: c=0 x[i][w-1-j] == '.' x[i][w-1-j] [i] x i w-1-j w-1 w 1 j '.' r[i][w-1-j] = c r[i][w-1-j] [i] r i w-1-j w-1 w 1 j c c += 1 c 1 for i in range(w):
    c = 0
    for j in range(h):
        if x[j][i] == '.':
            u[j][i] = c
            c += 1
        else: c=0 i range(w) range w c = 0 c 0 for j in range(h):
        if x[j][i] == '.':
            u[j][i] = c
            c += 1
        else: c=0 j range(h) range h if x[j][i] == '.':
            u[j][i] = c
            c += 1
        else: c=0 x[j][i] == '.' x[j][i] [j] x j i '.' u[j][i] = c u[j][i] [j] u j i c c += 1 c 1 for i in range(w):
    c = 0
    for j in range(h):
        if x[h-1-j][i] == '.':
            d[h-1-j][i] = c
            c += 1
        else: c=0 i range(w) range w c = 0 c 0 for j in range(h):
        if x[h-1-j][i] == '.':
            d[h-1-j][i] = c
            c += 1
        else: c=0 j range(h) range h if x[h-1-j][i] == '.':
            d[h-1-j][i] = c
            c += 1
        else: c=0 x[h-1-j][i] == '.' x[h-1-j][i] [h-1-j] x h-1-j h-1 h 1 j i '.' d[h-1-j][i] = c d[h-1-j][i] [h-1-j] d h-1-j h-1 h 1 j i c c += 1 c 1 ans = 0 ans 0 for i in range(h):
    for j in range(w):
        c = l[i][j]+r[i][j]+u[i][j]+d[i][j]
        if x[i][j]=='.':c+=1
        ans = max(ans,c) i range(h) range h for j in range(w):
        c = l[i][j]+r[i][j]+u[i][j]+d[i][j]
        if x[i][j]=='.':c+=1
        ans = max(ans,c) j range(w) range w c = l[i][j]+r[i][j]+u[i][j]+d[i][j] c l[i][j]+r[i][j]+u[i][j]+d[i][j] l[i][j]+r[i][j]+u[i][j] l[i][j]+r[i][j] l[i][j] [i] l i j r[i][j] [i] r i j u[i][j] [i] u i j d[i][j] [i] d i j if x[i][j]=='.':c+=1
         x[i][j]=='.' x[i][j] [i] x i j '.' ans = max(ans,c) ans max(ans,c) max ans c print(ans) print ans r = [[0]*w for i in range(h)] [[0]*w for i in range(h)] r u = [[0]*w for i in range(h)] [[0]*w for i in range(h)] u c = 0 0 c ans = 0 0 ans w = map(int,input().split()) map(int,input().split()) w c += 1 1 c c += 1 1 c c = 0 0 c c = 0 0 c d = [[0]*w for i in range(h)] [[0]*w for i in range(h)] d l = [[0]*w for i in range(h)] [[0]*w for i in range(h)] l c = 0 0 c h,w = map(int,input().split()) map(int,input().split()) h c = l[i][j]+r[i][j]+u[i][j]+d[i][j] l[i][j]+r[i][j]+u[i][j]+d[i][j] c x = [] [] x c += 1 1 c c += 1 1 c ans = max(ans,c) max(ans,c) ans
h,w = map(int,input().split())
x = []
for i in range(h):
    x.append(input())

l = [[0]*w for i in range(h)]
r = [[0]*w for i in range(h)]
u = [[0]*w for i in range(h)]
d = [[0]*w for i in range(h)]

for i in range(h):
    c = 0
    for j in range(w):
        if x[i][j] == '.':
            l[i][j] = c
            c += 1
        else: c=0


for i in range(h):
    c = 0
    for j in range(w):
        if x[i][w-1-j] == '.':
            r[i][w-1-j] = c
            c += 1
        else: c=0

for i in range(w):
    c = 0
    for j in range(h):
        if x[j][i] == '.':
            u[j][i] = c
            c += 1
        else: c=0

for i in range(w):
    c = 0
    for j in range(h):
        if x[h-1-j][i] == '.':
            d[h-1-j][i] = c
            c += 1
        else: c=0

ans = 0
for i in range(h):
    for j in range(w):
        c = l[i][j]+r[i][j]+u[i][j]+d[i][j]
        if x[i][j]=='.':c+=1
        ans = max(ans,c)

print(ans)