import sys
input = sys.stdin.readline
h,w = map(int,input().split())
s = [list(input().strip()) for _ in range(h)]
# print(s)

R = [[0]*w for _ in range(h)]
L = [[0]*w for _ in range(h)]
D = [[0]*w for _ in range(h)]
U = [[0]*w for _ in range(h)]

for i in range(h):
    cur = 0
    for j in range(w-1,-1,-1):
        if s[i][j] == '#':
            cur = 0
        else:
            cur += 1
        R[i][j] = cur

for i in range(h):
    cur = 0
    for j in range(w):
        if s[i][j] == '#':
            cur = 0
        else:
            cur += 1
        L[i][j] = cur

for j in range(w):
    cur = 0
    for i in range(h):
        if s[i][j] == '#':
            cur = 0
        else:
            cur += 1
        D[i][j] = cur

for j in range(w):
    cur = 0
    for i in range(h-1,-1,-1):
        if s[i][j] == '#':
            cur = 0
        else:
            cur += 1
        U[i][j] = cur

ans = 0
for i in range(h):
    for j in range(w):
        if s[i][j] =='#':
            continue
        ans = max(ans,L[i][j]+R[i][j]+U[i][j]+D[i][j]-3)
print(ans) import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline h,w = map(int,input().split()) h map(int,input().split()) map int input().split() ().split () input split w list(input().strip()) for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) list(input().strip()) list input().strip() ().strip () input strip s = [list(input().strip()) for _ in range(h)] s [list(input().strip()) for _ in range(h)] [0]*w for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) [0]*w [0] 0 w R = [[0]*w for _ in range(h)] R [[0]*w for _ in range(h)] [0]*w for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) [0]*w [0] 0 w L = [[0]*w for _ in range(h)] L [[0]*w for _ in range(h)] [0]*w for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) [0]*w [0] 0 w D = [[0]*w for _ in range(h)] D [[0]*w for _ in range(h)] [0]*w for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) [0]*w [0] 0 w U = [[0]*w for _ in range(h)] U [[0]*w for _ in range(h)] for i in range(h):
    cur = 0
    for j in range(w-1,-1,-1):
        if s[i][j] == '#':
            cur = 0
        else:
            cur += 1
        R[i][j] = cur i range(h) range h cur = 0 cur 0 for j in range(w-1,-1,-1):
        if s[i][j] == '#':
            cur = 0
        else:
            cur += 1
        R[i][j] = cur j range(w-1,-1,-1) range w-1 w 1 -1 -1 if s[i][j] == '#':
            cur = 0
        else:
            cur += 1
         s[i][j] == '#' s[i][j] [i] s i j '#' cur = 0 cur 0 cur += 1 cur 1 R[i][j] = cur R[i][j] [i] R i j cur for i in range(h):
    cur = 0
    for j in range(w):
        if s[i][j] == '#':
            cur = 0
        else:
            cur += 1
        L[i][j] = cur i range(h) range h cur = 0 cur 0 for j in range(w):
        if s[i][j] == '#':
            cur = 0
        else:
            cur += 1
        L[i][j] = cur j range(w) range w if s[i][j] == '#':
            cur = 0
        else:
            cur += 1
         s[i][j] == '#' s[i][j] [i] s i j '#' cur = 0 cur 0 cur += 1 cur 1 L[i][j] = cur L[i][j] [i] L i j cur for j in range(w):
    cur = 0
    for i in range(h):
        if s[i][j] == '#':
            cur = 0
        else:
            cur += 1
        D[i][j] = cur j range(w) range w cur = 0 cur 0 for i in range(h):
        if s[i][j] == '#':
            cur = 0
        else:
            cur += 1
        D[i][j] = cur i range(h) range h if s[i][j] == '#':
            cur = 0
        else:
            cur += 1
         s[i][j] == '#' s[i][j] [i] s i j '#' cur = 0 cur 0 cur += 1 cur 1 D[i][j] = cur D[i][j] [i] D i j cur for j in range(w):
    cur = 0
    for i in range(h-1,-1,-1):
        if s[i][j] == '#':
            cur = 0
        else:
            cur += 1
        U[i][j] = cur j range(w) range w cur = 0 cur 0 for i in range(h-1,-1,-1):
        if s[i][j] == '#':
            cur = 0
        else:
            cur += 1
        U[i][j] = cur i range(h-1,-1,-1) range h-1 h 1 -1 -1 if s[i][j] == '#':
            cur = 0
        else:
            cur += 1
         s[i][j] == '#' s[i][j] [i] s i j '#' cur = 0 cur 0 cur += 1 cur 1 U[i][j] = cur U[i][j] [i] U i j cur ans = 0 ans 0 for i in range(h):
    for j in range(w):
        if s[i][j] =='#':
            continue
        ans = max(ans,L[i][j]+R[i][j]+U[i][j]+D[i][j]-3) i range(h) range h for j in range(w):
        if s[i][j] =='#':
            continue
        ans = max(ans,L[i][j]+R[i][j]+U[i][j]+D[i][j]-3) j range(w) range w if s[i][j] =='#':
            continue
         s[i][j] =='#' s[i][j] [i] s i j '#' continue ans = max(ans,L[i][j]+R[i][j]+U[i][j]+D[i][j]-3) ans max(ans,L[i][j]+R[i][j]+U[i][j]+D[i][j]-3) max ans L[i][j]+R[i][j]+U[i][j]+D[i][j]-3 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 3 print(ans) print ans cur = 0 0 cur L = [[0]*w for _ in range(h)] [[0]*w for _ in range(h)] L cur += 1 1 cur ans = max(ans,L[i][j]+R[i][j]+U[i][j]+D[i][j]-3) max(ans,L[i][j]+R[i][j]+U[i][j]+D[i][j]-3) ans cur += 1 1 cur cur = 0 0 cur w = map(int,input().split()) map(int,input().split()) w cur += 1 1 cur cur = 0 0 cur input = sys.stdin.readline sys.stdin.readline input cur = 0 0 cur cur = 0 0 cur D = [[0]*w for _ in range(h)] [[0]*w for _ in range(h)] D ans = 0 0 ans cur = 0 0 cur h,w = map(int,input().split()) map(int,input().split()) h s = [list(input().strip()) for _ in range(h)] [list(input().strip()) for _ in range(h)] s cur += 1 1 cur U = [[0]*w for _ in range(h)] [[0]*w for _ in range(h)] U R = [[0]*w for _ in range(h)] [[0]*w for _ in range(h)] R cur = 0 0 cur cur = 0 0 cur
import sys
input = sys.stdin.readline
h,w = map(int,input().split())
s = [list(input().strip()) for _ in range(h)]
# print(s)

R = [[0]*w for _ in range(h)]
L = [[0]*w for _ in range(h)]
D = [[0]*w for _ in range(h)]
U = [[0]*w for _ in range(h)]

for i in range(h):
    cur = 0
    for j in range(w-1,-1,-1):
        if s[i][j] == '#':
            cur = 0
        else:
            cur += 1
        R[i][j] = cur

for i in range(h):
    cur = 0
    for j in range(w):
        if s[i][j] == '#':
            cur = 0
        else:
            cur += 1
        L[i][j] = cur

for j in range(w):
    cur = 0
    for i in range(h):
        if s[i][j] == '#':
            cur = 0
        else:
            cur += 1
        D[i][j] = cur

for j in range(w):
    cur = 0
    for i in range(h-1,-1,-1):
        if s[i][j] == '#':
            cur = 0
        else:
            cur += 1
        U[i][j] = cur

ans = 0
for i in range(h):
    for j in range(w):
        if s[i][j] =='#':
            continue
        ans = max(ans,L[i][j]+R[i][j]+U[i][j]+D[i][j]-3)
print(ans)