import sys
def input():
    return sys.stdin.readline()[:-1]
sys.setrecursionlimit(1000000)

h,w=map(int,input().split())
maze = [[]for _ in range(h)]
for i in range(h):
    maze[i].extend(list(input()))

R=[[0 for i in range(w)]for i in range(h)]
L=[[0 for i in range(w)]for i in range(h)]
U=[[0 for i in range(w)]for i in range(h)]
B=[[0 for i in range(w)]for i in range(h)]

for i in range(h):
    for j in range(w):
        if maze[i][j]=="#":continue
        if j==0: L[i][j]=1
        else: L[i][j]=L[i][j-1]+1
        if i==0: U[i][j]=1
        else: U[i][j]=U[i-1][j]+1

for i in range(h):
    for j in range(w):
        if maze[h-1-i][w-1-j]=="#":continue
        if i==0:B[h-1-i][w-1-j]=1
        else: B[h-1-i][w-1-j] = B[h-i][w-1-j]+1
        if j==0:R[h-1-i][w-1-j]=1
        else: R[h-1-i][w-1-j] = R[h-1-i][w-j]+1


#print(*B,sep="\n")
#print("\n")
#print(*U,sep="\n")


ma=0
for i in range(h):
    for j in range(w):
        if maze[i][j]=="#":continue
        ma=max(ma,R[i][j]+L[i][j]+U[i][j]+B[i][j]-3)

print(ma) import sys sys def input():
    return sys.stdin.readline()[:-1] input return sys.stdin.readline()[:-1] sys.stdin.readline()[:-1] sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline :-1 -1 sys.setrecursionlimit(1000000) sys.setrecursionlimit sys setrecursionlimit 1000000 h,w=map(int,input().split()) h map(int,input().split()) map int input().split() ().split () input split w []for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) [] maze = [[]for _ in range(h)] maze [[]for _ in range(h)] for i in range(h):
    maze[i].extend(list(input())) i range(h) range h maze[i].extend(list(input())) [i].extend [i] maze i extend list(input()) list input() input [0 for i in range(w)]for i in range(h) for i in range(h) i range(h) range h for i in range(h) [0 for i in range(w)] R=[[0 for i in range(w)]for i in range(h)] R [[0 for i in range(w)]for i in range(h)] [0 for i in range(w)]for i in range(h) for i in range(h) i range(h) range h for i in range(h) [0 for i in range(w)] L=[[0 for i in range(w)]for i in range(h)] L [[0 for i in range(w)]for i in range(h)] [0 for i in range(w)]for i in range(h) for i in range(h) i range(h) range h for i in range(h) [0 for i in range(w)] U=[[0 for i in range(w)]for i in range(h)] U [[0 for i in range(w)]for i in range(h)] [0 for i in range(w)]for i in range(h) for i in range(h) i range(h) range h for i in range(h) [0 for i in range(w)] B=[[0 for i in range(w)]for i in range(h)] B [[0 for i in range(w)]for i in range(h)] for i in range(h):
    for j in range(w):
        if maze[i][j]=="#":continue
        if j==0: L[i][j]=1
        else: L[i][j]=L[i][j-1]+1
        if i==0: U[i][j]=1
        else: U[i][j]=U[i-1][j]+1 i range(h) range h for j in range(w):
        if maze[i][j]=="#":continue
        if j==0: L[i][j]=1
        else: L[i][j]=L[i][j-1]+1
        if i==0: U[i][j]=1
        else: U[i][j]=U[i-1][j]+1 j range(w) range w if maze[i][j]=="#":continue
         maze[i][j]=="#" maze[i][j] [i] maze i j "#" if j==0: L[i][j]=1
        else: L[i][j]=L[i][j-1]+1
         j==0 j 0 if i==0: U[i][j]=1
        else: U[i][j]=U[i-1][j]+1 i==0 i 0 for i in range(h):
    for j in range(w):
        if maze[h-1-i][w-1-j]=="#":continue
        if i==0:B[h-1-i][w-1-j]=1
        else: B[h-1-i][w-1-j] = B[h-i][w-1-j]+1
        if j==0:R[h-1-i][w-1-j]=1
        else: R[h-1-i][w-1-j] = R[h-1-i][w-j]+1


#print(*B,sep="\n")
#print("\n")
#print(*U,sep="\n") i range(h) range h for j in range(w):
        if maze[h-1-i][w-1-j]=="#":continue
        if i==0:B[h-1-i][w-1-j]=1
        else: B[h-1-i][w-1-j] = B[h-i][w-1-j]+1
        if j==0:R[h-1-i][w-1-j]=1
        else: R[h-1-i][w-1-j] = R[h-1-i][w-j]+1


#print(*B,sep="\n")
#print("\n")
#print(*U,sep="\n") j range(w) range w if maze[h-1-i][w-1-j]=="#":continue
         maze[h-1-i][w-1-j]=="#" maze[h-1-i][w-1-j] [h-1-i] maze h-1-i h-1 h 1 i w-1-j w-1 w 1 j "#" if i==0:B[h-1-i][w-1-j]=1
        else: B[h-1-i][w-1-j] = B[h-i][w-1-j]+1
         i==0 i 0 if j==0:R[h-1-i][w-1-j]=1
        else: R[h-1-i][w-1-j] = R[h-1-i][w-j]+1


#print(*B,sep="\n")
#print("\n")
#print(*U,sep="\n") j==0 j 0 ma=0 ma 0 for i in range(h):
    for j in range(w):
        if maze[i][j]=="#":continue
        ma=max(ma,R[i][j]+L[i][j]+U[i][j]+B[i][j]-3) i range(h) range h for j in range(w):
        if maze[i][j]=="#":continue
        ma=max(ma,R[i][j]+L[i][j]+U[i][j]+B[i][j]-3) j range(w) range w if maze[i][j]=="#":continue
         maze[i][j]=="#" maze[i][j] [i] maze i j "#" ma=max(ma,R[i][j]+L[i][j]+U[i][j]+B[i][j]-3) ma max(ma,R[i][j]+L[i][j]+U[i][j]+B[i][j]-3) max ma R[i][j]+L[i][j]+U[i][j]+B[i][j]-3 R[i][j]+L[i][j]+U[i][j]+B[i][j] R[i][j]+L[i][j]+U[i][j] R[i][j]+L[i][j] R[i][j] [i] R i j L[i][j] [i] L i j U[i][j] [i] U i j B[i][j] [i] B i j 3 print(ma) print ma w=map(int,input().split()) map(int,input().split()) w L=[[0 for i in range(w)]for i in range(h)] [[0 for i in range(w)]for i in range(h)] L B=[[0 for i in range(w)]for i in range(h)] [[0 for i in range(w)]for i in range(h)] B maze = [[]for _ in range(h)] [[]for _ in range(h)] maze R=[[0 for i in range(w)]for i in range(h)] [[0 for i in range(w)]for i in range(h)] R ma=max(ma,R[i][j]+L[i][j]+U[i][j]+B[i][j]-3) max(ma,R[i][j]+L[i][j]+U[i][j]+B[i][j]-3) ma U=[[0 for i in range(w)]for i in range(h)] [[0 for i in range(w)]for i in range(h)] U ma=0 0 ma def input():
    return sys.stdin.readline()[:-1] def input():
    return sys.stdin.readline()[:-1] input h,w=map(int,input().split()) map(int,input().split()) h
import sys
def input():
    return sys.stdin.readline()[:-1]
sys.setrecursionlimit(1000000)

h,w=map(int,input().split())
maze = [[]for _ in range(h)]
for i in range(h):
    maze[i].extend(list(input()))

R=[[0 for i in range(w)]for i in range(h)]
L=[[0 for i in range(w)]for i in range(h)]
U=[[0 for i in range(w)]for i in range(h)]
B=[[0 for i in range(w)]for i in range(h)]

for i in range(h):
    for j in range(w):
        if maze[i][j]=="#":continue
        if j==0: L[i][j]=1
        else: L[i][j]=L[i][j-1]+1
        if i==0: U[i][j]=1
        else: U[i][j]=U[i-1][j]+1

for i in range(h):
    for j in range(w):
        if maze[h-1-i][w-1-j]=="#":continue
        if i==0:B[h-1-i][w-1-j]=1
        else: B[h-1-i][w-1-j] = B[h-i][w-1-j]+1
        if j==0:R[h-1-i][w-1-j]=1
        else: R[h-1-i][w-1-j] = R[h-1-i][w-j]+1


#print(*B,sep="\n")
#print("\n")
#print(*U,sep="\n")


ma=0
for i in range(h):
    for j in range(w):
        if maze[i][j]=="#":continue
        ma=max(ma,R[i][j]+L[i][j]+U[i][j]+B[i][j]-3)

print(ma)
