import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_tuple(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_col(H):
    '''
    H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) #一列の場合
    '''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return tuple(map(list, zip(*ret)))


def read_matrix(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    # return [list(map(int, read().split())) for _ in range(H)] # 内包表記はpypyでは遅いため


def read_map_as(H, W, replace={'#': 1, '.': 0}):
    '''
    文字列のmapを置換して読み込み。デフォでは#→1,.→0
    '''
    ret = []
    ret.append([1] * (W + 2))
    for _ in range(H):
        ret.append([1] + [replace[s] for s in read()[:-1]] + [1])
        # 内包表記はpypyでは若干遅いことに注意
        # #numpy使うだろうからこれを残しておくけど
    ret.append([1] * (W + 2))
    return ret


MOD = 10**9 + 7
INF = 2**31  # 2147483648 > 10**9
# default import
from collections import defaultdict, Counter, deque
from operator import itemgetter
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  # , insort_left, insort_right

# https://atcoder.jp/contests/abc129/tasks/abc129_d
# すべてのマスにおいてみてって感じかな
# 2000*2000だとマスにおいたときにO(1)で何マス照らせるか取得したい
# 前処理で横/縦に何マス伸びてるか記録しておけばいいのでは？

H, W = read_ints()
S = read_map_as(H, W)

yoko = [[-1] * (W + 2) for _ in ra(H + 2)]
tate = [[-1] * (W + 2) for _ in ra(H + 2)]

# 横の前処理
for i in ra(H + 2):
    fillranges = []
    pre_0 = 0
    for j in ra(1, W + 2):
        if S[i][j] == 1:
            fillranges.append((pre_0, j))
            pre_0 = j
    for l, r in fillranges:
        for j in range(l, r):
            yoko[i][j] = r - l - 1

# 縦の前処理
for j in ra(W + 2):
    fillranges = []
    pre_0 = 0
    for i in ra(1, H + 2):
        if S[i][j] == 1:
            fillranges.append((pre_0, i))
            pre_0 = i
    for l, r in fillranges:
        for i in range(l, r):
            tate[i][j] = r - l - 1

# from pprint import pprint
# pprint(tate)
# pprint(yoko)
ans = 0
for i, j in product(range(1, H + 1), range(1, W + 1)):
    ans = max(yoko[i][j] + tate[i][j] - 1, ans)
print(ans) import sys sys sys.setrecursionlimit(1 << 25) sys.setrecursionlimit sys setrecursionlimit 1 << 25 1 25 read = sys.stdin.readline read sys.stdin.readline sys.stdin sys stdin readline ra = range ra range enu = enumerate enu enumerate def read_ints():
    return list(map(int, read().split())) read_ints return list(map(int, read().split())) list(map(int, read().split())) list map(int, read().split()) map int read().split() ().split () read split def read_a_int():
    return int(read()) read_a_int return int(read()) int(read()) int read() read def read_tuple(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret read_tuple '''
    H is number of rows
    ''' ret = [] ret [] for _ in range(H):
        ret.append(tuple(map(int, read().split())))
     _ range(H) range H ret.append(tuple(map(int, read().split()))) ret.append ret append tuple(map(int, read().split())) tuple map(int, read().split()) map int read().split() ().split () read split return ret ret H H def read_col(H):
    '''
    H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) #一列の場合
    '''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return tuple(map(list, zip(*ret))) read_col '''
    H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) #一列の場合
    ''' ret = [] ret [] for _ in range(H):
        ret.append(list(map(int, read().split())))
     _ range(H) range H ret.append(list(map(int, read().split()))) ret.append ret append list(map(int, read().split())) list map(int, read().split()) map int read().split() ().split () read split return tuple(map(list, zip(*ret))) tuple(map(list, zip(*ret))) tuple map(list, zip(*ret)) map list zip(*ret) zip *ret ret H H def read_matrix(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    # return [list(map(int, read().split())) for _ in range(H)] # 内包表記はpypyでは遅いため read_matrix '''
    H is number of rows
    ''' ret = [] ret [] for _ in range(H):
        ret.append(list(map(int, read().split())))
     _ range(H) range H ret.append(list(map(int, read().split()))) ret.append ret append list(map(int, read().split())) list map(int, read().split()) map int read().split() ().split () read split return ret ret H H def read_map_as(H, W, replace={'#': 1, '.': 0}):
    '''
    文字列のmapを置換して読み込み。デフォでは#→1,.→0
    '''
    ret = []
    ret.append([1] * (W + 2))
    for _ in range(H):
        ret.append([1] + [replace[s] for s in read()[:-1]] + [1])
        # 内包表記はpypyでは若干遅いことに注意
        # #numpy使うだろうからこれを残しておくけど
    ret.append([1] * (W + 2))
    return ret read_map_as '''
    文字列のmapを置換して読み込み。デフォでは#→1,.→0
    ''' ret = [] ret [] ret.append([1] * (W + 2)) ret.append ret append [1] * (W + 2) [1] 1 W + 2 W 2 for _ in range(H):
        ret.append([1] + [replace[s] for s in read()[:-1]] + [1])
        # 内包表記はpypyでは若干遅いことに注意
        # #numpy使うだろうからこれを残しておくけど
     _ range(H) range H replace[s] for s in read()[:-1] for s in read()[:-1] s read()[:-1] () read :-1 -1 for s in read()[:-1] replace[s] replace s ret.append([1] + [replace[s] for s in read()[:-1]] + [1]) ret.append ret append [1] + [replace[s] for s in read()[:-1]] + [1] [1] + [replace[s] for s in read()[:-1]] [1] 1 [replace[s] for s in read()[:-1]] [1] 1 ret.append([1] * (W + 2)) ret.append ret append [1] * (W + 2) [1] 1 W + 2 W 2 return ret ret H H W W replace={'#': 1, '.': 0} replace {'#': 1, '.': 0} '#' '#' 1 '.' '.' 0 MOD = 10**9 + 7 MOD 10**9 + 7 10**9 10 9 7 INF = 2**31 INF 2**31 2 31 from collections import defaultdict, Counter, deque from operator import itemgetter from itertools import product, permutations, combinations from bisect import bisect_left, bisect_right H, W = read_ints() H read_ints() read_ints W S = read_map_as(H, W) S read_map_as(H, W) read_map_as H W [-1] * (W + 2) for _ in ra(H + 2) for _ in ra(H + 2) _ ra(H + 2) ra H + 2 H 2 for _ in ra(H + 2) [-1] * (W + 2) [-1] -1 W + 2 W 2 yoko = [[-1] * (W + 2) for _ in ra(H + 2)] yoko [[-1] * (W + 2) for _ in ra(H + 2)] [-1] * (W + 2) for _ in ra(H + 2) for _ in ra(H + 2) _ ra(H + 2) ra H + 2 H 2 for _ in ra(H + 2) [-1] * (W + 2) [-1] -1 W + 2 W 2 tate = [[-1] * (W + 2) for _ in ra(H + 2)] tate [[-1] * (W + 2) for _ in ra(H + 2)] for i in ra(H + 2):
    fillranges = []
    pre_0 = 0
    for j in ra(1, W + 2):
        if S[i][j] == 1:
            fillranges.append((pre_0, j))
            pre_0 = j
    for l, r in fillranges:
        for j in range(l, r):
            yoko[i][j] = r - l - 1

# 縦の前処理 i ra(H + 2) ra H + 2 H 2 fillranges = [] fillranges [] pre_0 = 0 pre_0 0 for j in ra(1, W + 2):
        if S[i][j] == 1:
            fillranges.append((pre_0, j))
            pre_0 = j
     j ra(1, W + 2) ra 1 W + 2 W 2 if S[i][j] == 1:
            fillranges.append((pre_0, j))
            pre_0 = j
     S[i][j] == 1 S[i][j] [i] S i j 1 fillranges.append((pre_0, j)) fillranges.append fillranges append (pre_0, j) pre_0 j pre_0 = j pre_0 j for l, r in fillranges:
        for j in range(l, r):
            yoko[i][j] = r - l - 1

# 縦の前処理 l r fillranges for j in range(l, r):
            yoko[i][j] = r - l - 1

# 縦の前処理 j range(l, r) range l r yoko[i][j] = r - l - 1 yoko[i][j] [i] yoko i j r - l - 1 r - l r l 1 for j in ra(W + 2):
    fillranges = []
    pre_0 = 0
    for i in ra(1, H + 2):
        if S[i][j] == 1:
            fillranges.append((pre_0, i))
            pre_0 = i
    for l, r in fillranges:
        for i in range(l, r):
            tate[i][j] = r - l - 1

# from pprint import pprint
# pprint(tate)
# pprint(yoko) j ra(W + 2) ra W + 2 W 2 fillranges = [] fillranges [] pre_0 = 0 pre_0 0 for i in ra(1, H + 2):
        if S[i][j] == 1:
            fillranges.append((pre_0, i))
            pre_0 = i
     i ra(1, H + 2) ra 1 H + 2 H 2 if S[i][j] == 1:
            fillranges.append((pre_0, i))
            pre_0 = i
     S[i][j] == 1 S[i][j] [i] S i j 1 fillranges.append((pre_0, i)) fillranges.append fillranges append (pre_0, i) pre_0 i pre_0 = i pre_0 i for l, r in fillranges:
        for i in range(l, r):
            tate[i][j] = r - l - 1

# from pprint import pprint
# pprint(tate)
# pprint(yoko) l r fillranges for i in range(l, r):
            tate[i][j] = r - l - 1

# from pprint import pprint
# pprint(tate)
# pprint(yoko) i range(l, r) range l r tate[i][j] = r - l - 1 tate[i][j] [i] tate i j r - l - 1 r - l r l 1 ans = 0 ans 0 for i, j in product(range(1, H + 1), range(1, W + 1)):
    ans = max(yoko[i][j] + tate[i][j] - 1, ans) i j product(range(1, H + 1), range(1, W + 1)) product range(1, H + 1) range 1 H + 1 H 1 range(1, W + 1) range 1 W + 1 W 1 ans = max(yoko[i][j] + tate[i][j] - 1, ans) ans max(yoko[i][j] + tate[i][j] - 1, ans) max yoko[i][j] + tate[i][j] - 1 yoko[i][j] + tate[i][j] yoko[i][j] [i] yoko i j tate[i][j] [i] tate i j 1 ans print(ans) print ans def read_a_int():
    return int(read()) def read_a_int():
    return int(read()) read_a_int pre_0 = 0 0 pre_0 def read_map_as(H, W, replace={'#': 1, '.': 0}):
    '''
    文字列のmapを置換して読み込み。デフォでは#→1,.→0
    '''
    ret = []
    ret.append([1] * (W + 2))
    for _ in range(H):
        ret.append([1] + [replace[s] for s in read()[:-1]] + [1])
        # 内包表記はpypyでは若干遅いことに注意
        # #numpy使うだろうからこれを残しておくけど
    ret.append([1] * (W + 2))
    return ret def read_map_as(H, W, replace={'#': 1, '.': 0}):
    '''
    文字列のmapを置換して読み込み。デフォでは#→1,.→0
    '''
    ret = []
    ret.append([1] * (W + 2))
    for _ in range(H):
        ret.append([1] + [replace[s] for s in read()[:-1]] + [1])
        # 内包表記はpypyでは若干遅いことに注意
        # #numpy使うだろうからこれを残しておくけど
    ret.append([1] * (W + 2))
    return ret read_map_as ra = range range ra fillranges = [] [] fillranges def read_matrix(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    # return [list(map(int, read().split())) for _ in range(H)] # 内包表記はpypyでは遅いため def read_matrix(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    # return [list(map(int, read().split())) for _ in range(H)] # 内包表記はpypyでは遅いため read_matrix fillranges = [] [] fillranges def read_ints():
    return list(map(int, read().split())) def read_ints():
    return list(map(int, read().split())) read_ints def read_tuple(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret def read_tuple(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret read_tuple def read_col(H):
    '''
    H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) #一列の場合
    '''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return tuple(map(list, zip(*ret))) def read_col(H):
    '''
    H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) #一列の場合
    '''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return tuple(map(list, zip(*ret))) read_col MOD = 10**9 + 7 10**9 + 7 MOD yoko = [[-1] * (W + 2) for _ in ra(H + 2)] [[-1] * (W + 2) for _ in ra(H + 2)] yoko H, W = read_ints() read_ints() H W = read_ints() read_ints() W S = read_map_as(H, W) read_map_as(H, W) S pre_0 = j j pre_0 ans = 0 0 ans ans = max(yoko[i][j] + tate[i][j] - 1, ans) max(yoko[i][j] + tate[i][j] - 1, ans) ans tate = [[-1] * (W + 2) for _ in ra(H + 2)] [[-1] * (W + 2) for _ in ra(H + 2)] tate pre_0 = 0 0 pre_0 pre_0 = i i pre_0 read = sys.stdin.readline sys.stdin.readline read enu = enumerate enumerate enu INF = 2**31 2**31 INF
import sys
sys.setrecursionlimit(1 << 25)
read = sys.stdin.readline
ra = range
enu = enumerate


def read_ints():
    return list(map(int, read().split()))


def read_a_int():
    return int(read())


def read_tuple(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(tuple(map(int, read().split())))
    return ret


def read_col(H):
    '''
    H is number of rows
    A列、B列が与えられるようなとき
    ex1)A,B=read_col(H)    ex2) A,=read_col(H) #一列の場合
    '''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return tuple(map(list, zip(*ret)))


def read_matrix(H):
    '''
    H is number of rows
    '''
    ret = []
    for _ in range(H):
        ret.append(list(map(int, read().split())))
    return ret
    # return [list(map(int, read().split())) for _ in range(H)] # 内包表記はpypyでは遅いため


def read_map_as(H, W, replace={'#': 1, '.': 0}):
    '''
    文字列のmapを置換して読み込み。デフォでは#→1,.→0
    '''
    ret = []
    ret.append([1] * (W + 2))
    for _ in range(H):
        ret.append([1] + [replace[s] for s in read()[:-1]] + [1])
        # 内包表記はpypyでは若干遅いことに注意
        # #numpy使うだろうからこれを残しておくけど
    ret.append([1] * (W + 2))
    return ret


MOD = 10**9 + 7
INF = 2**31  # 2147483648 > 10**9
# default import
from collections import defaultdict, Counter, deque
from operator import itemgetter
from itertools import product, permutations, combinations
from bisect import bisect_left, bisect_right  # , insort_left, insort_right

# https://atcoder.jp/contests/abc129/tasks/abc129_d
# すべてのマスにおいてみてって感じかな
# 2000*2000だとマスにおいたときにO(1)で何マス照らせるか取得したい
# 前処理で横/縦に何マス伸びてるか記録しておけばいいのでは？

H, W = read_ints()
S = read_map_as(H, W)

yoko = [[-1] * (W + 2) for _ in ra(H + 2)]
tate = [[-1] * (W + 2) for _ in ra(H + 2)]

# 横の前処理
for i in ra(H + 2):
    fillranges = []
    pre_0 = 0
    for j in ra(1, W + 2):
        if S[i][j] == 1:
            fillranges.append((pre_0, j))
            pre_0 = j
    for l, r in fillranges:
        for j in range(l, r):
            yoko[i][j] = r - l - 1

# 縦の前処理
for j in ra(W + 2):
    fillranges = []
    pre_0 = 0
    for i in ra(1, H + 2):
        if S[i][j] == 1:
            fillranges.append((pre_0, i))
            pre_0 = i
    for l, r in fillranges:
        for i in range(l, r):
            tate[i][j] = r - l - 1

# from pprint import pprint
# pprint(tate)
# pprint(yoko)
ans = 0
for i, j in product(range(1, H + 1), range(1, W + 1)):
    ans = max(yoko[i][j] + tate[i][j] - 1, ans)
print(ans)
