import sys
input = sys.stdin.readline

h,w=map(int,input().split())
s=[[] for i in range(h)]
for i in range(h):
    si=input()
    s[i]=si
"""
h,w=4,6
s=[['#', '.', '.', '#', '.', '.'], ['.', '.', '.', '.', '.', '#'], ['.', '.', '.', '.', '#', '.'], ['#', '.', '#', '.', '.', '.']]    
"""
ww=[[0]*w for i in range(h)]
#www=[[0]*w for i in range(h)]
www=[0]*w
for i in range(h):
    jsum=0
    jcnt=1
    jj=[0]*(w+1)
    for j in range(w):
        if s[i][j]==".":
#            www[i][j]=jcnt
            www[j]=jcnt
            if j<w-1 and s[i][j+1]=="#":
                jcnt+=1
            jsum+=1
        else:
#            print(jsum,jst,jed)
            if jsum!=0:
                jj[jcnt-1]=jsum
            jsum=0
    jcnt+=1
    jj[jcnt-1]=jsum
            
    for j in range(w):
        if s[i][j]==".":
#            ww[i][j]=jj[www[i][j]]
            ww[i][j]=jj[www[j]]
#    print(jj)
                
hh=[[0]*w for i in range(h)]
hhh=[0]*h
for j in range(w):
    isum=0
    icnt=1
    ii=[0]*(h+1)
    for i in range(h):
        if s[i][j]==".":
#            www[i][j]=jcnt
            hhh[i]=icnt
            if i<h-1 and s[i+1][j]=="#":
                icnt+=1
            isum+=1
        else:
#            print(jsum,jst,jed)
            if isum!=0:
                ii[icnt-1]=isum
            isum=0
    icnt+=1
    ii[icnt-1]=isum
            
    for i in range(h):
        if s[i][j]==".":
#            ww[i][j]=jj[www[i][j]]
            hh[i][j]=ii[hhh[i]]
#    print(jj)
            
ijmax=0
for i in range(h):
    for j in range(w):
        if s[i][j]==".":
            ijmax=max(ijmax,ww[i][j]+hh[i][j]-1)

print(ijmax)
                 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 [] for i in range(h) for i in range(h) i range(h) range h for i in range(h) [] s=[[] for i in range(h)] s [[] for i in range(h)] for i in range(h):
    si=input()
    s[i]=si i range(h) range h si=input() si input() input s[i]=si s[i] s i si """
h,w=4,6
s=[['#', '.', '.', '#', '.', '.'], ['.', '.', '.', '.', '.', '#'], ['.', '.', '.', '.', '#', '.'], ['#', '.', '#', '.', '.', '.']]    
""" [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 ww=[[0]*w for i in range(h)] ww [[0]*w for i in range(h)] www=[0]*w www [0]*w [0] 0 w for i in range(h):
    jsum=0
    jcnt=1
    jj=[0]*(w+1)
    for j in range(w):
        if s[i][j]==".":
#            www[i][j]=jcnt
            www[j]=jcnt
            if j<w-1 and s[i][j+1]=="#":
                jcnt+=1
            jsum+=1
        else:
#            print(jsum,jst,jed)
            if jsum!=0:
                jj[jcnt-1]=jsum
            jsum=0
    jcnt+=1
    jj[jcnt-1]=jsum
            
    for j in range(w):
        if s[i][j]==".":
#            ww[i][j]=jj[www[i][j]]
            ww[i][j]=jj[www[j]]
#    print(jj)
                 i range(h) range h jsum=0 jsum 0 jcnt=1 jcnt 1 jj=[0]*(w+1) jj [0]*(w+1) [0] 0 w+1 w 1 for j in range(w):
        if s[i][j]==".":
#            www[i][j]=jcnt
            www[j]=jcnt
            if j<w-1 and s[i][j+1]=="#":
                jcnt+=1
            jsum+=1
        else:
#            print(jsum,jst,jed)
            if jsum!=0:
                jj[jcnt-1]=jsum
            jsum=0
     j range(w) range w if s[i][j]==".":
#            www[i][j]=jcnt
            www[j]=jcnt
            if j<w-1 and s[i][j+1]=="#":
                jcnt+=1
            jsum+=1
        else:
#            print(jsum,jst,jed)
            if jsum!=0:
                jj[jcnt-1]=jsum
            jsum=0
     s[i][j]=="." s[i][j] [i] s i j "." www[j]=jcnt www[j] www j jcnt if j<w-1 and s[i][j+1]=="#":
                jcnt+=1
             j<w-1 and s[i][j+1]=="#" j<w-1 j w-1 w 1 s[i][j+1]=="#" s[i][j+1] [i] s i j+1 j 1 "#" jcnt+=1 jcnt 1 jsum+=1 jsum 1 if jsum!=0:
                jj[jcnt-1]=jsum
             jsum!=0 jsum 0 jj[jcnt-1]=jsum jj[jcnt-1] jj jcnt-1 jcnt 1 jsum jsum=0 jsum 0 jcnt+=1 jcnt 1 jj[jcnt-1]=jsum jj[jcnt-1] jj jcnt-1 jcnt 1 jsum for j in range(w):
        if s[i][j]==".":
#            ww[i][j]=jj[www[i][j]]
            ww[i][j]=jj[www[j]]
#    print(jj)
                 j range(w) range w if s[i][j]==".":
#            ww[i][j]=jj[www[i][j]]
            ww[i][j]=jj[www[j]]
#    print(jj)
                 s[i][j]=="." s[i][j] [i] s i j "." ww[i][j]=jj[www[j]] ww[i][j] [i] ww i j jj[www[j]] jj www[j] www j [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 hh=[[0]*w for i in range(h)] hh [[0]*w for i in range(h)] hhh=[0]*h hhh [0]*h [0] 0 h for j in range(w):
    isum=0
    icnt=1
    ii=[0]*(h+1)
    for i in range(h):
        if s[i][j]==".":
#            www[i][j]=jcnt
            hhh[i]=icnt
            if i<h-1 and s[i+1][j]=="#":
                icnt+=1
            isum+=1
        else:
#            print(jsum,jst,jed)
            if isum!=0:
                ii[icnt-1]=isum
            isum=0
    icnt+=1
    ii[icnt-1]=isum
            
    for i in range(h):
        if s[i][j]==".":
#            ww[i][j]=jj[www[i][j]]
            hh[i][j]=ii[hhh[i]]
#    print(jj)
             j range(w) range w isum=0 isum 0 icnt=1 icnt 1 ii=[0]*(h+1) ii [0]*(h+1) [0] 0 h+1 h 1 for i in range(h):
        if s[i][j]==".":
#            www[i][j]=jcnt
            hhh[i]=icnt
            if i<h-1 and s[i+1][j]=="#":
                icnt+=1
            isum+=1
        else:
#            print(jsum,jst,jed)
            if isum!=0:
                ii[icnt-1]=isum
            isum=0
     i range(h) range h if s[i][j]==".":
#            www[i][j]=jcnt
            hhh[i]=icnt
            if i<h-1 and s[i+1][j]=="#":
                icnt+=1
            isum+=1
        else:
#            print(jsum,jst,jed)
            if isum!=0:
                ii[icnt-1]=isum
            isum=0
     s[i][j]=="." s[i][j] [i] s i j "." hhh[i]=icnt hhh[i] hhh i icnt if i<h-1 and s[i+1][j]=="#":
                icnt+=1
             i<h-1 and s[i+1][j]=="#" i<h-1 i h-1 h 1 s[i+1][j]=="#" s[i+1][j] [i+1] s i+1 i 1 j "#" icnt+=1 icnt 1 isum+=1 isum 1 if isum!=0:
                ii[icnt-1]=isum
             isum!=0 isum 0 ii[icnt-1]=isum ii[icnt-1] ii icnt-1 icnt 1 isum isum=0 isum 0 icnt+=1 icnt 1 ii[icnt-1]=isum ii[icnt-1] ii icnt-1 icnt 1 isum for i in range(h):
        if s[i][j]==".":
#            ww[i][j]=jj[www[i][j]]
            hh[i][j]=ii[hhh[i]]
#    print(jj)
             i range(h) range h if s[i][j]==".":
#            ww[i][j]=jj[www[i][j]]
            hh[i][j]=ii[hhh[i]]
#    print(jj)
             s[i][j]=="." s[i][j] [i] s i j "." hh[i][j]=ii[hhh[i]] hh[i][j] [i] hh i j ii[hhh[i]] ii hhh[i] hhh i ijmax=0 ijmax 0 for i in range(h):
    for j in range(w):
        if s[i][j]==".":
            ijmax=max(ijmax,ww[i][j]+hh[i][j]-1) i range(h) range h for j in range(w):
        if s[i][j]==".":
            ijmax=max(ijmax,ww[i][j]+hh[i][j]-1) j range(w) range w if s[i][j]==".":
            ijmax=max(ijmax,ww[i][j]+hh[i][j]-1) s[i][j]=="." s[i][j] [i] s i j "." ijmax=max(ijmax,ww[i][j]+hh[i][j]-1) ijmax max(ijmax,ww[i][j]+hh[i][j]-1) max ijmax ww[i][j]+hh[i][j]-1 ww[i][j]+hh[i][j] ww[i][j] [i] ww i j hh[i][j] [i] hh i j 1 print(ijmax) print ijmax jsum+=1 1 jsum jcnt+=1 1 jcnt h,w=map(int,input().split()) map(int,input().split()) h isum=0 0 isum jj=[0]*(w+1) [0]*(w+1) jj jcnt=1 1 jcnt s=[[] for i in range(h)] [[] for i in range(h)] s ww=[[0]*w for i in range(h)] [[0]*w for i in range(h)] ww icnt+=1 1 icnt ijmax=max(ijmax,ww[i][j]+hh[i][j]-1) max(ijmax,ww[i][j]+hh[i][j]-1) ijmax ii=[0]*(h+1) [0]*(h+1) ii si=input() input() si hhh=[0]*h [0]*h hhh jsum=0 0 jsum jsum=0 0 jsum w=map(int,input().split()) map(int,input().split()) w icnt=1 1 icnt input = sys.stdin.readline sys.stdin.readline input isum+=1 1 isum jcnt+=1 1 jcnt hh=[[0]*w for i in range(h)] [[0]*w for i in range(h)] hh www=[0]*w [0]*w www icnt+=1 1 icnt ijmax=0 0 ijmax isum=0 0 isum
import sys
input = sys.stdin.readline

h,w=map(int,input().split())
s=[[] for i in range(h)]
for i in range(h):
    si=input()
    s[i]=si
"""
h,w=4,6
s=[['#', '.', '.', '#', '.', '.'], ['.', '.', '.', '.', '.', '#'], ['.', '.', '.', '.', '#', '.'], ['#', '.', '#', '.', '.', '.']]    
"""
ww=[[0]*w for i in range(h)]
#www=[[0]*w for i in range(h)]
www=[0]*w
for i in range(h):
    jsum=0
    jcnt=1
    jj=[0]*(w+1)
    for j in range(w):
        if s[i][j]==".":
#            www[i][j]=jcnt
            www[j]=jcnt
            if j<w-1 and s[i][j+1]=="#":
                jcnt+=1
            jsum+=1
        else:
#            print(jsum,jst,jed)
            if jsum!=0:
                jj[jcnt-1]=jsum
            jsum=0
    jcnt+=1
    jj[jcnt-1]=jsum
            
    for j in range(w):
        if s[i][j]==".":
#            ww[i][j]=jj[www[i][j]]
            ww[i][j]=jj[www[j]]
#    print(jj)
                
hh=[[0]*w for i in range(h)]
hhh=[0]*h
for j in range(w):
    isum=0
    icnt=1
    ii=[0]*(h+1)
    for i in range(h):
        if s[i][j]==".":
#            www[i][j]=jcnt
            hhh[i]=icnt
            if i<h-1 and s[i+1][j]=="#":
                icnt+=1
            isum+=1
        else:
#            print(jsum,jst,jed)
            if isum!=0:
                ii[icnt-1]=isum
            isum=0
    icnt+=1
    ii[icnt-1]=isum
            
    for i in range(h):
        if s[i][j]==".":
#            ww[i][j]=jj[www[i][j]]
            hh[i][j]=ii[hhh[i]]
#    print(jj)
            
ijmax=0
for i in range(h):
    for j in range(w):
        if s[i][j]==".":
            ijmax=max(ijmax,ww[i][j]+hh[i][j]-1)

print(ijmax)
                
