import numpy as np
H,W=map(int, input().split())
S=[]
for h in range(H):
    s=list(input())
    S.append(s)
S=np.array(S)
ruit=np.zeros((H,W))
ruit[0,:]=np.where(S[0,:]==".",1,0)
ruil=np.zeros((H,W))
ruil[:,0]=np.where(S[:,0]==".",1,0)
ruir=np.zeros((H,W))
ruir[:,-1]=np.where(S[:,-1]==".",1,0)
ruib=np.zeros((H,W))
ruib[-1,:]=np.where(S[-1,:]==".",1,0)

for h in range(1,H):
    nowt=np.where(S[h,:]==".",1,0)
    ruit[h,:]=(ruit[h-1,:]+nowt)*nowt

    nowb=np.where(S[-(h+1),:]==".",1,0)
    ruib[-(h+1),:]=(ruib[-h,:]+nowb)*nowb

for w in range(1,W):
    nowl=np.where(S[:,w]==".",1,0)
    ruil[:,w]=(ruil[:,w-1]+nowl)*nowl
    nowr=np.where(S[:,-(w+1)]==".",1,0)
    ruir[:,-(w+1)]=(ruir[:,-w]+nowr)*nowr
#print(ruir)
#print(ruil)
#print(ruib)
print(int((ruit+ruib+ruil+ruir-3).max()))


    


 import numpy as np numpy H,W=map(int, input().split()) H map(int, input().split()) map int input().split() ().split () input split W S=[] S [] for h in range(H):
    s=list(input())
    S.append(s) h range(H) range H s=list(input()) s list(input()) list input() input S.append(s) S.append S append s S=np.array(S) S np.array(S) np.array np array S ruit=np.zeros((H,W)) ruit np.zeros((H,W)) np.zeros np zeros (H,W) H W ruit[0,:]=np.where(S[0,:]==".",1,0) ruit[0,:] ruit 0 np.where(S[0,:]==".",1,0) np.where np where S[0,:]=="." S[0,:] S 0 "." 1 0 ruil=np.zeros((H,W)) ruil np.zeros((H,W)) np.zeros np zeros (H,W) H W ruil[:,0]=np.where(S[:,0]==".",1,0) ruil[:,0] ruil : np.where(S[:,0]==".",1,0) np.where np where S[:,0]=="." S[:,0] S : "." 1 0 ruir=np.zeros((H,W)) ruir np.zeros((H,W)) np.zeros np zeros (H,W) H W ruir[:,-1]=np.where(S[:,-1]==".",1,0) ruir[:,-1] ruir : np.where(S[:,-1]==".",1,0) np.where np where S[:,-1]=="." S[:,-1] S : "." 1 0 ruib=np.zeros((H,W)) ruib np.zeros((H,W)) np.zeros np zeros (H,W) H W ruib[-1,:]=np.where(S[-1,:]==".",1,0) ruib[-1,:] ruib -1 np.where(S[-1,:]==".",1,0) np.where np where S[-1,:]=="." S[-1,:] S -1 "." 1 0 for h in range(1,H):
    nowt=np.where(S[h,:]==".",1,0)
    ruit[h,:]=(ruit[h-1,:]+nowt)*nowt

    nowb=np.where(S[-(h+1),:]==".",1,0)
    ruib[-(h+1),:]=(ruib[-h,:]+nowb)*nowb h range(1,H) range 1 H nowt=np.where(S[h,:]==".",1,0) nowt np.where(S[h,:]==".",1,0) np.where np where S[h,:]=="." S[h,:] S h "." 1 0 ruit[h,:]=(ruit[h-1,:]+nowt)*nowt ruit[h,:] ruit h (ruit[h-1,:]+nowt)*nowt ruit[h-1,:]+nowt ruit[h-1,:] ruit h-1 h 1 nowt nowt nowb=np.where(S[-(h+1),:]==".",1,0) nowb np.where(S[-(h+1),:]==".",1,0) np.where np where S[-(h+1),:]=="." S[-(h+1),:] S -(h+1) h+1 h 1 "." 1 0 ruib[-(h+1),:]=(ruib[-h,:]+nowb)*nowb ruib[-(h+1),:] ruib -(h+1) h+1 h 1 (ruib[-h,:]+nowb)*nowb ruib[-h,:]+nowb ruib[-h,:] ruib -h h nowb nowb for w in range(1,W):
    nowl=np.where(S[:,w]==".",1,0)
    ruil[:,w]=(ruil[:,w-1]+nowl)*nowl
    nowr=np.where(S[:,-(w+1)]==".",1,0)
    ruir[:,-(w+1)]=(ruir[:,-w]+nowr)*nowr
#print(ruir)
#print(ruil)
#print(ruib) w range(1,W) range 1 W nowl=np.where(S[:,w]==".",1,0) nowl np.where(S[:,w]==".",1,0) np.where np where S[:,w]=="." S[:,w] S : "." 1 0 ruil[:,w]=(ruil[:,w-1]+nowl)*nowl ruil[:,w] ruil : (ruil[:,w-1]+nowl)*nowl ruil[:,w-1]+nowl ruil[:,w-1] ruil : nowl nowl nowr=np.where(S[:,-(w+1)]==".",1,0) nowr np.where(S[:,-(w+1)]==".",1,0) np.where np where S[:,-(w+1)]=="." S[:,-(w+1)] S : "." 1 0 ruir[:,-(w+1)]=(ruir[:,-w]+nowr)*nowr ruir[:,-(w+1)] ruir : (ruir[:,-w]+nowr)*nowr ruir[:,-w]+nowr ruir[:,-w] ruir : nowr nowr print(int((ruit+ruib+ruil+ruir-3).max())) print int((ruit+ruib+ruil+ruir-3).max()) int (ruit+ruib+ruil+ruir-3).max() ruit+ruib+ruil+ruir-3).max ruit+ruib+ruil+ruir-3 ruit+ruib+ruil+ruir ruit+ruib+ruil ruit+ruib ruit ruib ruil ruir 3 max s=list(input()) list(input()) s nowb=np.where(S[-(h+1),:]==".",1,0) np.where(S[-(h+1),:]==".",1,0) nowb H,W=map(int, input().split()) map(int, input().split()) H ruib=np.zeros((H,W)) np.zeros((H,W)) ruib S=np.array(S) np.array(S) S ruil=np.zeros((H,W)) np.zeros((H,W)) ruil S=[] [] S nowr=np.where(S[:,-(w+1)]==".",1,0) np.where(S[:,-(w+1)]==".",1,0) nowr nowt=np.where(S[h,:]==".",1,0) np.where(S[h,:]==".",1,0) nowt ruit=np.zeros((H,W)) np.zeros((H,W)) ruit W=map(int, input().split()) map(int, input().split()) W ruir=np.zeros((H,W)) np.zeros((H,W)) ruir nowl=np.where(S[:,w]==".",1,0) np.where(S[:,w]==".",1,0) nowl
import numpy as np
H,W=map(int, input().split())
S=[]
for h in range(H):
    s=list(input())
    S.append(s)
S=np.array(S)
ruit=np.zeros((H,W))
ruit[0,:]=np.where(S[0,:]==".",1,0)
ruil=np.zeros((H,W))
ruil[:,0]=np.where(S[:,0]==".",1,0)
ruir=np.zeros((H,W))
ruir[:,-1]=np.where(S[:,-1]==".",1,0)
ruib=np.zeros((H,W))
ruib[-1,:]=np.where(S[-1,:]==".",1,0)

for h in range(1,H):
    nowt=np.where(S[h,:]==".",1,0)
    ruit[h,:]=(ruit[h-1,:]+nowt)*nowt

    nowb=np.where(S[-(h+1),:]==".",1,0)
    ruib[-(h+1),:]=(ruib[-h,:]+nowb)*nowb

for w in range(1,W):
    nowl=np.where(S[:,w]==".",1,0)
    ruil[:,w]=(ruil[:,w-1]+nowl)*nowl
    nowr=np.where(S[:,-(w+1)]==".",1,0)
    ruir[:,-(w+1)]=(ruir[:,-w]+nowr)*nowr
#print(ruir)
#print(ruil)
#print(ruib)
print(int((ruit+ruib+ruil+ruir-3).max()))


    



