from math import ceil,floor,factorial,gcd,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf
from itertools import accumulate,groupby,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heapify,heappop,heappush
from queue import Queue,LifoQueue,PriorityQueue
from copy import deepcopy
from time import time
from functools import reduce
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

h, w = MAP()
s = []
for i in range(h):
    s.append(input())
a = [[0]*w for i in range(h)]
b = [[0]*w for i in range(h)]

for i in range(h):
    tmp = 0
    for j in range(w):
        if s[i][j] == '.':
            tmp += 1
            a[i][j] = tmp
        else:
            tmp = 0
    tmp = 0
    for j in range(w-1, -1, -1):
        if s[i][j] == '.':
            tmp = max(tmp, a[i][j])
            a[i][j] = tmp
        else:
            tmp = 0

ans = 0
for j in range(w):
    tmp = 0
    for i in range(h):
        if s[i][j] == '.':
            tmp += 1
            b[i][j] = tmp
        else:
            tmp = 0
    tmp = 0
    for i in range(h-1, -1, -1):
        if s[i][j] == '.':
            tmp = max(tmp, b[i][j])
            b[i][j] = tmp
        else:
            tmp = 0
        ans = max(ans, a[i][j]+b[i][j]-1)
print(ans) from math import ceil,floor,factorial,gcd,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf from itertools import accumulate,groupby,permutations,combinations,product,combinations_with_replacement from collections import deque,defaultdict,Counter from bisect import bisect_left,bisect_right from operator import itemgetter from heapq import heapify,heappop,heappush from queue import Queue,LifoQueue,PriorityQueue from copy import deepcopy from time import time from functools import reduce import string string import sys sys sys.setrecursionlimit(10 ** 7) sys.setrecursionlimit sys setrecursionlimit 10 ** 7 10 7 def input() : return sys.stdin.readline().strip() input def INT()   : return int(input()) INT def MAP()   : return map(int,input().split()) MAP def LIST()  : return list(MAP()) LIST h, w = MAP() h MAP() MAP w s = [] s [] for i in range(h):
    s.append(input()) i range(h) range h s.append(input()) s.append s append input() input [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 a = [[0]*w for i in range(h)] a [[0]*w for i in range(h)] [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 b = [[0]*w for i in range(h)] b [[0]*w for i in range(h)] for i in range(h):
    tmp = 0
    for j in range(w):
        if s[i][j] == '.':
            tmp += 1
            a[i][j] = tmp
        else:
            tmp = 0
    tmp = 0
    for j in range(w-1, -1, -1):
        if s[i][j] == '.':
            tmp = max(tmp, a[i][j])
            a[i][j] = tmp
        else:
            tmp = 0 i range(h) range h tmp = 0 tmp 0 for j in range(w):
        if s[i][j] == '.':
            tmp += 1
            a[i][j] = tmp
        else:
            tmp = 0
     j range(w) range w if s[i][j] == '.':
            tmp += 1
            a[i][j] = tmp
        else:
            tmp = 0
     s[i][j] == '.' s[i][j] [i] s i j '.' tmp += 1 tmp 1 a[i][j] = tmp a[i][j] [i] a i j tmp tmp = 0 tmp 0 tmp = 0 tmp 0 for j in range(w-1, -1, -1):
        if s[i][j] == '.':
            tmp = max(tmp, a[i][j])
            a[i][j] = tmp
        else:
            tmp = 0 j range(w-1, -1, -1) range w-1 w 1 -1 -1 if s[i][j] == '.':
            tmp = max(tmp, a[i][j])
            a[i][j] = tmp
        else:
            tmp = 0 s[i][j] == '.' s[i][j] [i] s i j '.' tmp = max(tmp, a[i][j]) tmp max(tmp, a[i][j]) max tmp a[i][j] [i] a i j a[i][j] = tmp a[i][j] [i] a i j tmp tmp = 0 tmp 0 ans = 0 ans 0 for j in range(w):
    tmp = 0
    for i in range(h):
        if s[i][j] == '.':
            tmp += 1
            b[i][j] = tmp
        else:
            tmp = 0
    tmp = 0
    for i in range(h-1, -1, -1):
        if s[i][j] == '.':
            tmp = max(tmp, b[i][j])
            b[i][j] = tmp
        else:
            tmp = 0
        ans = max(ans, a[i][j]+b[i][j]-1) j range(w) range w tmp = 0 tmp 0 for i in range(h):
        if s[i][j] == '.':
            tmp += 1
            b[i][j] = tmp
        else:
            tmp = 0
     i range(h) range h if s[i][j] == '.':
            tmp += 1
            b[i][j] = tmp
        else:
            tmp = 0
     s[i][j] == '.' s[i][j] [i] s i j '.' tmp += 1 tmp 1 b[i][j] = tmp b[i][j] [i] b i j tmp tmp = 0 tmp 0 tmp = 0 tmp 0 for i in range(h-1, -1, -1):
        if s[i][j] == '.':
            tmp = max(tmp, b[i][j])
            b[i][j] = tmp
        else:
            tmp = 0
        ans = max(ans, a[i][j]+b[i][j]-1) i range(h-1, -1, -1) range h-1 h 1 -1 -1 if s[i][j] == '.':
            tmp = max(tmp, b[i][j])
            b[i][j] = tmp
        else:
            tmp = 0
         s[i][j] == '.' s[i][j] [i] s i j '.' tmp = max(tmp, b[i][j]) tmp max(tmp, b[i][j]) max tmp b[i][j] [i] b i j b[i][j] = tmp b[i][j] [i] b i j tmp tmp = 0 tmp 0 ans = max(ans, a[i][j]+b[i][j]-1) ans max(ans, a[i][j]+b[i][j]-1) max ans a[i][j]+b[i][j]-1 a[i][j]+b[i][j] a[i][j] [i] a i j b[i][j] [i] b i j 1 print(ans) print ans tmp = 0 0 tmp tmp += 1 1 tmp tmp = max(tmp, b[i][j]) max(tmp, b[i][j]) tmp ans = 0 0 ans h, w = MAP() MAP() h w = MAP() MAP() w s = [] [] s def input() : return sys.stdin.readline().strip() def input() : return sys.stdin.readline().strip() input a = [[0]*w for i in range(h)] [[0]*w for i in range(h)] a tmp = 0 0 tmp tmp = 0 0 tmp tmp += 1 1 tmp def INT()   : return int(input()) def INT()   : return int(input()) INT b = [[0]*w for i in range(h)] [[0]*w for i in range(h)] b tmp = 0 0 tmp def MAP()   : return map(int,input().split()) def MAP()   : return map(int,input().split()) MAP tmp = max(tmp, a[i][j]) max(tmp, a[i][j]) tmp tmp = 0 0 tmp tmp = 0 0 tmp ans = max(ans, a[i][j]+b[i][j]-1) max(ans, a[i][j]+b[i][j]-1) ans tmp = 0 0 tmp def LIST()  : return list(MAP()) def LIST()  : return list(MAP()) LIST tmp = 0 0 tmp
from math import ceil,floor,factorial,gcd,sqrt,log2,cos,sin,tan,acos,asin,atan,degrees,radians,pi,inf
from itertools import accumulate,groupby,permutations,combinations,product,combinations_with_replacement
from collections import deque,defaultdict,Counter
from bisect import bisect_left,bisect_right
from operator import itemgetter
from heapq import heapify,heappop,heappush
from queue import Queue,LifoQueue,PriorityQueue
from copy import deepcopy
from time import time
from functools import reduce
import string
import sys
sys.setrecursionlimit(10 ** 7)
def input() : return sys.stdin.readline().strip()
def INT()   : return int(input())
def MAP()   : return map(int,input().split())
def LIST()  : return list(MAP())

h, w = MAP()
s = []
for i in range(h):
    s.append(input())
a = [[0]*w for i in range(h)]
b = [[0]*w for i in range(h)]

for i in range(h):
    tmp = 0
    for j in range(w):
        if s[i][j] == '.':
            tmp += 1
            a[i][j] = tmp
        else:
            tmp = 0
    tmp = 0
    for j in range(w-1, -1, -1):
        if s[i][j] == '.':
            tmp = max(tmp, a[i][j])
            a[i][j] = tmp
        else:
            tmp = 0

ans = 0
for j in range(w):
    tmp = 0
    for i in range(h):
        if s[i][j] == '.':
            tmp += 1
            b[i][j] = tmp
        else:
            tmp = 0
    tmp = 0
    for i in range(h-1, -1, -1):
        if s[i][j] == '.':
            tmp = max(tmp, b[i][j])
            b[i][j] = tmp
        else:
            tmp = 0
        ans = max(ans, a[i][j]+b[i][j]-1)
print(ans)