import sys
sys.setrecursionlimit(10**7) #再帰関数の上限,10**5以上の場合python
import math
from copy import copy, deepcopy
from copy import deepcopy as dcp
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right#2分探索
#bisect_left(l,x), bisect(l,x)#aはソート済みである必要あり。aの中からx未満の要素数を返す。rightだと以下
from collections import deque, defaultdict
#deque(l), pop(), append(x), popleft(), appendleft(x)
#q.rotate(n)で → にn回ローテート
from collections import Counter#文字列を個数カウント辞書に、
#S=Counter(l),S.most_common(x),S.keys(),S.values(),S.items()
from itertools import accumulate,combinations,permutations#累積和
#list(accumulate(l))
from heapq import heapify,heappop,heappush
#heapify(q),heappush(q,a),heappop(q) #q=heapify(q)としないこと、返り値はNone
#import fractions#古いatcoderコンテストの場合GCDなどはここからimportする
from functools import reduce,lru_cache#pypyでもうごく
#@lru_cache(maxsize = None)#maxsizeは保存するデータ数の最大値、2**nが最も高効率
from decimal import Decimal

def input(): 
    x=sys.stdin.readline()
    return x[:-1] if x[-1]=="\n" else x
def printe(*x):print("## ",*x,file=sys.stderr)
def printl(li): _=print(*li, sep="\n") if li else None
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)]
def main():
    mod = 1000000007
    #w.sort(key=itemgetter(1),reverse=True)  #二個目の要素で降順並び替え

    #N = int(input())
    H, W = map(int, input().split())
    #A = tuple(map(int, input().split())) #1行ベクトル
    #L = tuple(int(input()) for i in range(N)) #改行ベクトル
    S = tuple(tuple(input()) for i in range(H)) #改行行列

    cnt=[[[0]*W for _ in range(H)] for _ in range(4)]
    for i in range(0,H):
        mj=-1
        for j in range(0,W):
            if S[i][j]=="#":
                mj=j
                continue
            cnt[0][i][j]=(j-mj-1)
    for i in range(0,H):
        mj=W
        for j in range(W-1,-1,-1):
            if S[i][j]=="#":
                mj=j
                continue
            cnt[1][i][j]=(mj-j-1)

    for i in range(0,W):
        mj=-1
        for j in range(0,H):
            if S[j][i]=="#":
                mj=j
                continue
            #printe(j,i)
            cnt[2][j][i]=(j-mj-1)
    for i in range(0,W):
        mj=H
        for j in range(H-1,-1,-1):
            if S[j][i]=="#":
                mj=j
                continue
            cnt[3][j][i]=(mj-j-1)
    
    ans=0
    for i in range(0,H):
        for j in range(0,W):
            if S[i][j]=="#":
                continue
            x=cnt[0][i][j]+cnt[1][i][j]+cnt[2][i][j]+cnt[3][i][j]+1    
            ans=max(x,ans)
    print(ans)



if __name__ == "__main__":
    main() import sys sys sys.setrecursionlimit(10**7) sys.setrecursionlimit sys setrecursionlimit 10**7 10 7 import math math from copy import copy, deepcopy from copy import deepcopy as dcp from operator import itemgetter from bisect import bisect_left, bisect, bisect_right from collections import deque, defaultdict from collections import Counter from itertools import accumulate,combinations,permutations from heapq import heapify,heappop,heappush from functools import reduce,lru_cache from decimal import Decimal def input(): 
    x=sys.stdin.readline()
    return x[:-1] if x[-1]=="\n" else x input x=sys.stdin.readline() x sys.stdin.readline() sys.stdin.readline sys.stdin sys stdin readline return x[:-1] if x[-1]=="\n" else x x[:-1] if x[-1]=="\n" else x x[-1]=="\n" x[-1] x -1 "\n" x[:-1] x :-1 -1 x def printe(*x):print("## ",*x,file=sys.stderr) printe *x def printl(li): _=print(*li, sep="\n") if li else None printl li li def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds argsort inds=sorted(range(len(s)), key=lambda k: s[k]) inds sorted(range(len(s)), key=lambda k: s[k]) sorted range(len(s)) range len(s) len s key=lambda k: s[k] key lambda k: s[k] s[k] s k k s[i] for i in inds for i in inds i inds for i in inds s[i] s i if return_sorted: return inds, [s[i] for i in inds]
     return_sorted return inds inds s s return_sorted=False return_sorted False def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65 alp2num c c cap=False cap False def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65) num2alp i i cap=False cap False def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)] matmat K,N,M=len(B),len(A),len(B[0]) K len(B) len B N len(A) len A M len(B[0]) len B[0] B 0 [sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N) for i in range(N) i range(N) range N for i in range(N) [sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)] [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)] A A B B def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)] matvec N,size=len(v),len(M) N len(v) len v size len(M) len M sum([M[i][j]*v[j] for j in range(N)]) for i in range(size) for i in range(size) i range(size) range size for i in range(size) sum([M[i][j]*v[j] for j in range(N)]) sum [M[i][j]*v[j] for j in range(N)] return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)] [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)] M M v v def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)] T n,m=len(M),len(M[0]) n len(M) len M m len(M[0]) len M[0] M 0 [M[j][i] for j in range(n)] for i in range(m) for i in range(m) i range(m) range m for i in range(m) [M[j][i] for j in range(n)] return [[M[j][i] for j in range(n)] for i in range(m)] [[M[j][i] for j in range(n)] for i in range(m)] M M def main():
    mod = 1000000007
    #w.sort(key=itemgetter(1),reverse=True)  #二個目の要素で降順並び替え

    #N = int(input())
    H, W = map(int, input().split())
    #A = tuple(map(int, input().split())) #1行ベクトル
    #L = tuple(int(input()) for i in range(N)) #改行ベクトル
    S = tuple(tuple(input()) for i in range(H)) #改行行列

    cnt=[[[0]*W for _ in range(H)] for _ in range(4)]
    for i in range(0,H):
        mj=-1
        for j in range(0,W):
            if S[i][j]=="#":
                mj=j
                continue
            cnt[0][i][j]=(j-mj-1)
    for i in range(0,H):
        mj=W
        for j in range(W-1,-1,-1):
            if S[i][j]=="#":
                mj=j
                continue
            cnt[1][i][j]=(mj-j-1)

    for i in range(0,W):
        mj=-1
        for j in range(0,H):
            if S[j][i]=="#":
                mj=j
                continue
            #printe(j,i)
            cnt[2][j][i]=(j-mj-1)
    for i in range(0,W):
        mj=H
        for j in range(H-1,-1,-1):
            if S[j][i]=="#":
                mj=j
                continue
            cnt[3][j][i]=(mj-j-1)
    
    ans=0
    for i in range(0,H):
        for j in range(0,W):
            if S[i][j]=="#":
                continue
            x=cnt[0][i][j]+cnt[1][i][j]+cnt[2][i][j]+cnt[3][i][j]+1    
            ans=max(x,ans)
    print(ans) main mod = 1000000007 mod 1000000007 H, W = map(int, input().split()) H map(int, input().split()) map int input().split() ().split () input split W S = tuple(tuple(input()) for i in range(H)) S tuple(tuple(input()) for i in range(H)) tuple tuple(input()) tuple input() input [[0]*W for _ in range(H)] for _ in range(4) for _ in range(4) _ range(4) range 4 for _ in range(4) [[0]*W for _ in range(H)] cnt=[[[0]*W for _ in range(H)] for _ in range(4)] cnt [[[0]*W for _ in range(H)] for _ in range(4)] for i in range(0,H):
        mj=-1
        for j in range(0,W):
            if S[i][j]=="#":
                mj=j
                continue
            cnt[0][i][j]=(j-mj-1)
     i range(0,H) range 0 H mj=-1 mj -1 for j in range(0,W):
            if S[i][j]=="#":
                mj=j
                continue
            cnt[0][i][j]=(j-mj-1)
     j range(0,W) range 0 W if S[i][j]=="#":
                mj=j
                continue
             S[i][j]=="#" S[i][j] [i] S i j "#" mj=j mj j continue cnt[0][i][j]=(j-mj-1) cnt[0][i][j] [i] [0] cnt 0 i j j-mj-1 j-mj j mj 1 for i in range(0,H):
        mj=W
        for j in range(W-1,-1,-1):
            if S[i][j]=="#":
                mj=j
                continue
            cnt[1][i][j]=(mj-j-1)

     i range(0,H) range 0 H mj=W mj W for j in range(W-1,-1,-1):
            if S[i][j]=="#":
                mj=j
                continue
            cnt[1][i][j]=(mj-j-1)

     j range(W-1,-1,-1) range W-1 W 1 -1 -1 if S[i][j]=="#":
                mj=j
                continue
             S[i][j]=="#" S[i][j] [i] S i j "#" mj=j mj j continue cnt[1][i][j]=(mj-j-1) cnt[1][i][j] [i] [1] cnt 1 i j mj-j-1 mj-j mj j 1 for i in range(0,W):
        mj=-1
        for j in range(0,H):
            if S[j][i]=="#":
                mj=j
                continue
            #printe(j,i)
            cnt[2][j][i]=(j-mj-1)
     i range(0,W) range 0 W mj=-1 mj -1 for j in range(0,H):
            if S[j][i]=="#":
                mj=j
                continue
            #printe(j,i)
            cnt[2][j][i]=(j-mj-1)
     j range(0,H) range 0 H if S[j][i]=="#":
                mj=j
                continue
            #printe(j,i)
             S[j][i]=="#" S[j][i] [j] S j i "#" mj=j mj j continue cnt[2][j][i]=(j-mj-1) cnt[2][j][i] [j] [2] cnt 2 j i j-mj-1 j-mj j mj 1 for i in range(0,W):
        mj=H
        for j in range(H-1,-1,-1):
            if S[j][i]=="#":
                mj=j
                continue
            cnt[3][j][i]=(mj-j-1)
    
     i range(0,W) range 0 W mj=H mj H for j in range(H-1,-1,-1):
            if S[j][i]=="#":
                mj=j
                continue
            cnt[3][j][i]=(mj-j-1)
    
     j range(H-1,-1,-1) range H-1 H 1 -1 -1 if S[j][i]=="#":
                mj=j
                continue
             S[j][i]=="#" S[j][i] [j] S j i "#" mj=j mj j continue cnt[3][j][i]=(mj-j-1) cnt[3][j][i] [j] [3] cnt 3 j i mj-j-1 mj-j mj j 1 ans=0 ans 0 for i in range(0,H):
        for j in range(0,W):
            if S[i][j]=="#":
                continue
            x=cnt[0][i][j]+cnt[1][i][j]+cnt[2][i][j]+cnt[3][i][j]+1    
            ans=max(x,ans)
     i range(0,H) range 0 H for j in range(0,W):
            if S[i][j]=="#":
                continue
            x=cnt[0][i][j]+cnt[1][i][j]+cnt[2][i][j]+cnt[3][i][j]+1    
            ans=max(x,ans)
     j range(0,W) range 0 W if S[i][j]=="#":
                continue
             S[i][j]=="#" S[i][j] [i] S i j "#" continue x=cnt[0][i][j]+cnt[1][i][j]+cnt[2][i][j]+cnt[3][i][j]+1 x cnt[0][i][j]+cnt[1][i][j]+cnt[2][i][j]+cnt[3][i][j]+1 cnt[0][i][j]+cnt[1][i][j]+cnt[2][i][j]+cnt[3][i][j] cnt[0][i][j]+cnt[1][i][j]+cnt[2][i][j] cnt[0][i][j]+cnt[1][i][j] cnt[0][i][j] [i] [0] cnt 0 i j cnt[1][i][j] [i] [1] cnt 1 i j cnt[2][i][j] [i] [2] cnt 2 i j cnt[3][i][j] [i] [3] cnt 3 i j 1 ans=max(x,ans) ans max(x,ans) max x ans print(ans) print ans if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)] def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)] matvec def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65) def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65) num2alp def input(): 
    x=sys.stdin.readline()
    return x[:-1] if x[-1]=="\n" else x def input(): 
    x=sys.stdin.readline()
    return x[:-1] if x[-1]=="\n" else x input def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)] def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)] T def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)] def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)] matmat def main():
    mod = 1000000007
    #w.sort(key=itemgetter(1),reverse=True)  #二個目の要素で降順並び替え

    #N = int(input())
    H, W = map(int, input().split())
    #A = tuple(map(int, input().split())) #1行ベクトル
    #L = tuple(int(input()) for i in range(N)) #改行ベクトル
    S = tuple(tuple(input()) for i in range(H)) #改行行列

    cnt=[[[0]*W for _ in range(H)] for _ in range(4)]
    for i in range(0,H):
        mj=-1
        for j in range(0,W):
            if S[i][j]=="#":
                mj=j
                continue
            cnt[0][i][j]=(j-mj-1)
    for i in range(0,H):
        mj=W
        for j in range(W-1,-1,-1):
            if S[i][j]=="#":
                mj=j
                continue
            cnt[1][i][j]=(mj-j-1)

    for i in range(0,W):
        mj=-1
        for j in range(0,H):
            if S[j][i]=="#":
                mj=j
                continue
            #printe(j,i)
            cnt[2][j][i]=(j-mj-1)
    for i in range(0,W):
        mj=H
        for j in range(H-1,-1,-1):
            if S[j][i]=="#":
                mj=j
                continue
            cnt[3][j][i]=(mj-j-1)
    
    ans=0
    for i in range(0,H):
        for j in range(0,W):
            if S[i][j]=="#":
                continue
            x=cnt[0][i][j]+cnt[1][i][j]+cnt[2][i][j]+cnt[3][i][j]+1    
            ans=max(x,ans)
    print(ans) def main():
    mod = 1000000007
    #w.sort(key=itemgetter(1),reverse=True)  #二個目の要素で降順並び替え

    #N = int(input())
    H, W = map(int, input().split())
    #A = tuple(map(int, input().split())) #1行ベクトル
    #L = tuple(int(input()) for i in range(N)) #改行ベクトル
    S = tuple(tuple(input()) for i in range(H)) #改行行列

    cnt=[[[0]*W for _ in range(H)] for _ in range(4)]
    for i in range(0,H):
        mj=-1
        for j in range(0,W):
            if S[i][j]=="#":
                mj=j
                continue
            cnt[0][i][j]=(j-mj-1)
    for i in range(0,H):
        mj=W
        for j in range(W-1,-1,-1):
            if S[i][j]=="#":
                mj=j
                continue
            cnt[1][i][j]=(mj-j-1)

    for i in range(0,W):
        mj=-1
        for j in range(0,H):
            if S[j][i]=="#":
                mj=j
                continue
            #printe(j,i)
            cnt[2][j][i]=(j-mj-1)
    for i in range(0,W):
        mj=H
        for j in range(H-1,-1,-1):
            if S[j][i]=="#":
                mj=j
                continue
            cnt[3][j][i]=(mj-j-1)
    
    ans=0
    for i in range(0,H):
        for j in range(0,W):
            if S[i][j]=="#":
                continue
            x=cnt[0][i][j]+cnt[1][i][j]+cnt[2][i][j]+cnt[3][i][j]+1    
            ans=max(x,ans)
    print(ans) main def printe(*x):print("## ",*x,file=sys.stderr) def printe(*x):print("## ",*x,file=sys.stderr) printe def printl(li): _=print(*li, sep="\n") if li else None def printl(li): _=print(*li, sep="\n") if li else None printl def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds argsort def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65 def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65 alp2num
import sys
sys.setrecursionlimit(10**7) #再帰関数の上限,10**5以上の場合python
import math
from copy import copy, deepcopy
from copy import deepcopy as dcp
from operator import itemgetter
from bisect import bisect_left, bisect, bisect_right#2分探索
#bisect_left(l,x), bisect(l,x)#aはソート済みである必要あり。aの中からx未満の要素数を返す。rightだと以下
from collections import deque, defaultdict
#deque(l), pop(), append(x), popleft(), appendleft(x)
#q.rotate(n)で → にn回ローテート
from collections import Counter#文字列を個数カウント辞書に、
#S=Counter(l),S.most_common(x),S.keys(),S.values(),S.items()
from itertools import accumulate,combinations,permutations#累積和
#list(accumulate(l))
from heapq import heapify,heappop,heappush
#heapify(q),heappush(q,a),heappop(q) #q=heapify(q)としないこと、返り値はNone
#import fractions#古いatcoderコンテストの場合GCDなどはここからimportする
from functools import reduce,lru_cache#pypyでもうごく
#@lru_cache(maxsize = None)#maxsizeは保存するデータ数の最大値、2**nが最も高効率
from decimal import Decimal

def input(): 
    x=sys.stdin.readline()
    return x[:-1] if x[-1]=="\n" else x
def printe(*x):print("## ",*x,file=sys.stderr)
def printl(li): _=print(*li, sep="\n") if li else None
def argsort(s, return_sorted=False): 
    inds=sorted(range(len(s)), key=lambda k: s[k])
    if return_sorted: return inds, [s[i] for i in inds]
    return inds
def alp2num(c,cap=False): return ord(c)-97 if not cap else ord(c)-65
def num2alp(i,cap=False): return chr(i+97) if not cap else chr(i+65)
def matmat(A,B):
    K,N,M=len(B),len(A),len(B[0])
    return [[sum([(A[i][k]*B[k][j]) for k in range(K)]) for j in range(M)] for i in range(N)]
def matvec(M,v):
    N,size=len(v),len(M)
    return [sum([M[i][j]*v[j] for j in range(N)]) for i in range(size)]
def T(M):
    n,m=len(M),len(M[0])
    return [[M[j][i] for j in range(n)] for i in range(m)]
def main():
    mod = 1000000007
    #w.sort(key=itemgetter(1),reverse=True)  #二個目の要素で降順並び替え

    #N = int(input())
    H, W = map(int, input().split())
    #A = tuple(map(int, input().split())) #1行ベクトル
    #L = tuple(int(input()) for i in range(N)) #改行ベクトル
    S = tuple(tuple(input()) for i in range(H)) #改行行列

    cnt=[[[0]*W for _ in range(H)] for _ in range(4)]
    for i in range(0,H):
        mj=-1
        for j in range(0,W):
            if S[i][j]=="#":
                mj=j
                continue
            cnt[0][i][j]=(j-mj-1)
    for i in range(0,H):
        mj=W
        for j in range(W-1,-1,-1):
            if S[i][j]=="#":
                mj=j
                continue
            cnt[1][i][j]=(mj-j-1)

    for i in range(0,W):
        mj=-1
        for j in range(0,H):
            if S[j][i]=="#":
                mj=j
                continue
            #printe(j,i)
            cnt[2][j][i]=(j-mj-1)
    for i in range(0,W):
        mj=H
        for j in range(H-1,-1,-1):
            if S[j][i]=="#":
                mj=j
                continue
            cnt[3][j][i]=(mj-j-1)
    
    ans=0
    for i in range(0,H):
        for j in range(0,W):
            if S[i][j]=="#":
                continue
            x=cnt[0][i][j]+cnt[1][i][j]+cnt[2][i][j]+cnt[3][i][j]+1    
            ans=max(x,ans)
    print(ans)



if __name__ == "__main__":
    main()