import numpy as np
h,w=map(int,input().split())
S=np.array([list(input()) for _ in range(h)])
S=np.where(S==".",1,0)

left,right,up,down=[np.zeros((h,w)) for _ in range(4)]
for i in range(w):
    left[:,i]=(left[:,i-1]+1)*S[:,i]
    right[:,-i-1]=(right[:,-i]+1)*S[:,-i-1]
for i in range(h):
    up[i]=(up[i-1]+1)*S[i]
    down[-i-1]=(down[-i]+1)*S[-i-1]

print(int(np.max(left+right+up+down)-3)) import numpy as np numpy h,w=map(int,input().split()) h map(int,input().split()) map int input().split() ().split () input split w list(input()) for _ in range(h) for _ in range(h) _ range(h) range h for _ in range(h) list(input()) list input() input S=np.array([list(input()) for _ in range(h)]) S np.array([list(input()) for _ in range(h)]) np.array np array [list(input()) for _ in range(h)] S=np.where(S==".",1,0) S np.where(S==".",1,0) np.where np where S=="." S "." 1 0 np.zeros((h,w)) for _ in range(4) for _ in range(4) _ range(4) range 4 for _ in range(4) np.zeros((h,w)) np.zeros np zeros (h,w) h w left,right,up,down=[np.zeros((h,w)) for _ in range(4)] left [np.zeros((h,w)) for _ in range(4)] right up down for i in range(w):
    left[:,i]=(left[:,i-1]+1)*S[:,i]
    right[:,-i-1]=(right[:,-i]+1)*S[:,-i-1] i range(w) range w left[:,i]=(left[:,i-1]+1)*S[:,i] left[:,i] left : (left[:,i-1]+1)*S[:,i] left[:,i-1]+1 left[:,i-1] left : 1 S[:,i] S : right[:,-i-1]=(right[:,-i]+1)*S[:,-i-1] right[:,-i-1] right : (right[:,-i]+1)*S[:,-i-1] right[:,-i]+1 right[:,-i] right : 1 S[:,-i-1] S : for i in range(h):
    up[i]=(up[i-1]+1)*S[i]
    down[-i-1]=(down[-i]+1)*S[-i-1] i range(h) range h up[i]=(up[i-1]+1)*S[i] up[i] up i (up[i-1]+1)*S[i] up[i-1]+1 up[i-1] up i-1 i 1 1 S[i] S i down[-i-1]=(down[-i]+1)*S[-i-1] down[-i-1] down -i-1 -i i 1 (down[-i]+1)*S[-i-1] down[-i]+1 down[-i] down -i i 1 S[-i-1] S -i-1 -i i 1 print(int(np.max(left+right+up+down)-3)) print int(np.max(left+right+up+down)-3) int np.max(left+right+up+down)-3 np.max(left+right+up+down) np.max np max left+right+up+down left+right+up left+right left right up down 3 h,w=map(int,input().split()) map(int,input().split()) h left,right,up,down=[np.zeros((h,w)) for _ in range(4)] [np.zeros((h,w)) for _ in range(4)] left up,down=[np.zeros((h,w)) for _ in range(4)] [np.zeros((h,w)) for _ in range(4)] up w=map(int,input().split()) map(int,input().split()) w S=np.array([list(input()) for _ in range(h)]) np.array([list(input()) for _ in range(h)]) S right,up,down=[np.zeros((h,w)) for _ in range(4)] [np.zeros((h,w)) for _ in range(4)] right down=[np.zeros((h,w)) for _ in range(4)] [np.zeros((h,w)) for _ in range(4)] down S=np.where(S==".",1,0) np.where(S==".",1,0) S
import numpy as np
h,w=map(int,input().split())
S=np.array([list(input()) for _ in range(h)])
S=np.where(S==".",1,0)

left,right,up,down=[np.zeros((h,w)) for _ in range(4)]
for i in range(w):
    left[:,i]=(left[:,i-1]+1)*S[:,i]
    right[:,-i-1]=(right[:,-i]+1)*S[:,-i-1]
for i in range(h):
    up[i]=(up[i-1]+1)*S[i]
    down[-i-1]=(down[-i]+1)*S[-i-1]

print(int(np.max(left+right+up+down)-3))