# ANSHUL GAUTAM
# IIIT-D

from math import *
from copy import *					# ll = deepcopy(l)
from heapq import *					# heappush(hp,x)
from string import *				# alpha = ascii_lowercase
from random import *				# l.sort(key=lambda l1:l1[0]-l1[1]) => ex: sort on the basis difference
from bisect import *				# bisect_left(arr,x,start,end)  => start and end parameters are temporary
from sys import stdin				# bisect_left return leftmost position where x should be inserted to keep sorted
from sys import maxsize				# minn = -maxsize
from operator import *				# d = sorted(d.items(), key=itemgetter(1))
from itertools import *				# pre = [0] + list(accumulate(l))
from decimal import Decimal 		# a = Decimal(a)	# use this for math questions
from collections import Counter		# d = dict(Counter(l))
from collections import defaultdict # d = defaultdict(list)

'''
4 6
#..#..
.....#
....#.
#.#...
'''

def transpose(m):
	rez = [[m[j][i] for j in range(len(m))] for i in range(len(m[0]))] 
	return rez

def giveLightIntervals(L,h,w):
	l = [[] for i in range(h)]
	for i in range(h):
		s,e,c = '','',0
		for j in range(w):
			if(L[i][j] == '#'):
				if(c > 0):
					e = j
					l[i].append([s,e-1])
					c = 0
				s,e = '',''
			else:
				if(s == ''):
					s = j
				c += 1
		if(L[i][-1] == '.'):
			l[i].append([s,w-1])
	return l

def solve(L,h,w):
	T = transpose(L)
	l = giveLightIntervals(L,h,w)
	t = giveLightIntervals(T,w,h)

	H = [[0 for i in range(w)] for j in range(h)]
	W = [[0 for i in range(h)] for j in range(w)]

	for i in range(h):
		zz = 0
		for j in range(w):
			if(len(l[i]) > zz):
				s,e = l[i][zz]
				val = e - s + 1
				if(s <= j <= e):
					H[i][j] = val
				if(j == e):
					zz += 1
			else:
				break

	for i in range(w):
		zz = 0
		for j in range(h):
			if(len(t[i]) > zz):
				s,e = t[i][zz]
				val = e - s + 1
				if(s <= j <= e):
					W[i][j] = val
				if(j == e):
					zz += 1
			else:
				break

	ans = 0

	for i in range(h):
		for j in range(w):
			curr = H[i][j] + W[j][i] - 1
			ans = max(ans,curr)

	return ans


H,W = list(map(int, stdin.readline().rstrip().split()))
L = []
for m in range(H):
	L.append(list(input()))
ans = solve(L,H,W)
print(ans)
 from math import * from copy import * from heapq import * from string import * from random import * from bisect import * from sys import stdin from sys import maxsize from operator import * from itertools import * from decimal import Decimal from collections import Counter from collections import defaultdict '''
4 6
#..#..
.....#
....#.
#.#...
''' def transpose(m):
	rez = [[m[j][i] for j in range(len(m))] for i in range(len(m[0]))] 
	return rez transpose [m[j][i] for j in range(len(m))] for i in range(len(m[0])) for i in range(len(m[0])) i range(len(m[0])) range len(m[0]) len m[0] m 0 for i in range(len(m[0])) [m[j][i] for j in range(len(m))] rez = [[m[j][i] for j in range(len(m))] for i in range(len(m[0]))] rez [[m[j][i] for j in range(len(m))] for i in range(len(m[0]))] return rez rez m m def giveLightIntervals(L,h,w):
	l = [[] for i in range(h)]
	for i in range(h):
		s,e,c = '','',0
		for j in range(w):
			if(L[i][j] == '#'):
				if(c > 0):
					e = j
					l[i].append([s,e-1])
					c = 0
				s,e = '',''
			else:
				if(s == ''):
					s = j
				c += 1
		if(L[i][-1] == '.'):
			l[i].append([s,w-1])
	return l giveLightIntervals [] for i in range(h) for i in range(h) i range(h) range h for i in range(h) [] l = [[] for i in range(h)] l [[] for i in range(h)] for i in range(h):
		s,e,c = '','',0
		for j in range(w):
			if(L[i][j] == '#'):
				if(c > 0):
					e = j
					l[i].append([s,e-1])
					c = 0
				s,e = '',''
			else:
				if(s == ''):
					s = j
				c += 1
		if(L[i][-1] == '.'):
			l[i].append([s,w-1])
	 i range(h) range h s,e,c = '','',0 s '' e '' c 0 for j in range(w):
			if(L[i][j] == '#'):
				if(c > 0):
					e = j
					l[i].append([s,e-1])
					c = 0
				s,e = '',''
			else:
				if(s == ''):
					s = j
				c += 1
		 j range(w) range w if(L[i][j] == '#'):
				if(c > 0):
					e = j
					l[i].append([s,e-1])
					c = 0
				s,e = '',''
			else:
				if(s == ''):
					s = j
				c += 1
		 L[i][j] == '#' L[i][j] [i] L i j '#' if(c > 0):
					e = j
					l[i].append([s,e-1])
					c = 0
				 c > 0 c 0 e = j e j l[i].append([s,e-1]) [i].append [i] l i append [s,e-1] s e-1 e 1 c = 0 c 0 s,e = '','' s '' e '' if(s == ''):
					s = j
				 s == '' s '' s = j s j c += 1 c 1 if(L[i][-1] == '.'):
			l[i].append([s,w-1])
	 L[i][-1] == '.' L[i][-1] [i] L i -1 '.' l[i].append([s,w-1]) [i].append [i] l i append [s,w-1] s w-1 w 1 return l l L L h h w w def solve(L,h,w):
	T = transpose(L)
	l = giveLightIntervals(L,h,w)
	t = giveLightIntervals(T,w,h)

	H = [[0 for i in range(w)] for j in range(h)]
	W = [[0 for i in range(h)] for j in range(w)]

	for i in range(h):
		zz = 0
		for j in range(w):
			if(len(l[i]) > zz):
				s,e = l[i][zz]
				val = e - s + 1
				if(s <= j <= e):
					H[i][j] = val
				if(j == e):
					zz += 1
			else:
				break

	for i in range(w):
		zz = 0
		for j in range(h):
			if(len(t[i]) > zz):
				s,e = t[i][zz]
				val = e - s + 1
				if(s <= j <= e):
					W[i][j] = val
				if(j == e):
					zz += 1
			else:
				break

	ans = 0

	for i in range(h):
		for j in range(w):
			curr = H[i][j] + W[j][i] - 1
			ans = max(ans,curr)

	return ans solve T = transpose(L) T transpose(L) transpose L l = giveLightIntervals(L,h,w) l giveLightIntervals(L,h,w) giveLightIntervals L h w t = giveLightIntervals(T,w,h) t giveLightIntervals(T,w,h) giveLightIntervals T w h [0 for i in range(w)] for j in range(h) for j in range(h) j range(h) range h for j in range(h) [0 for i in range(w)] H = [[0 for i in range(w)] for j in range(h)] H [[0 for i in range(w)] for j in range(h)] [0 for i in range(h)] for j in range(w) for j in range(w) j range(w) range w for j in range(w) [0 for i in range(h)] W = [[0 for i in range(h)] for j in range(w)] W [[0 for i in range(h)] for j in range(w)] for i in range(h):
		zz = 0
		for j in range(w):
			if(len(l[i]) > zz):
				s,e = l[i][zz]
				val = e - s + 1
				if(s <= j <= e):
					H[i][j] = val
				if(j == e):
					zz += 1
			else:
				break

	 i range(h) range h zz = 0 zz 0 for j in range(w):
			if(len(l[i]) > zz):
				s,e = l[i][zz]
				val = e - s + 1
				if(s <= j <= e):
					H[i][j] = val
				if(j == e):
					zz += 1
			else:
				break

	 j range(w) range w if(len(l[i]) > zz):
				s,e = l[i][zz]
				val = e - s + 1
				if(s <= j <= e):
					H[i][j] = val
				if(j == e):
					zz += 1
			else:
				break

	 len(l[i]) > zz len(l[i]) len l[i] l i zz s,e = l[i][zz] s l[i][zz] [i] l i zz e val = e - s + 1 val e - s + 1 e - s e s 1 if(s <= j <= e):
					H[i][j] = val
				 s <= j <= e s <= j s j e H[i][j] = val H[i][j] [i] H i j val if(j == e):
					zz += 1
			 j == e j e zz += 1 zz 1 break for i in range(w):
		zz = 0
		for j in range(h):
			if(len(t[i]) > zz):
				s,e = t[i][zz]
				val = e - s + 1
				if(s <= j <= e):
					W[i][j] = val
				if(j == e):
					zz += 1
			else:
				break

	 i range(w) range w zz = 0 zz 0 for j in range(h):
			if(len(t[i]) > zz):
				s,e = t[i][zz]
				val = e - s + 1
				if(s <= j <= e):
					W[i][j] = val
				if(j == e):
					zz += 1
			else:
				break

	 j range(h) range h if(len(t[i]) > zz):
				s,e = t[i][zz]
				val = e - s + 1
				if(s <= j <= e):
					W[i][j] = val
				if(j == e):
					zz += 1
			else:
				break

	 len(t[i]) > zz len(t[i]) len t[i] t i zz s,e = t[i][zz] s t[i][zz] [i] t i zz e val = e - s + 1 val e - s + 1 e - s e s 1 if(s <= j <= e):
					W[i][j] = val
				 s <= j <= e s <= j s j e W[i][j] = val W[i][j] [i] W i j val if(j == e):
					zz += 1
			 j == e j e zz += 1 zz 1 break ans = 0 ans 0 for i in range(h):
		for j in range(w):
			curr = H[i][j] + W[j][i] - 1
			ans = max(ans,curr)

	 i range(h) range h for j in range(w):
			curr = H[i][j] + W[j][i] - 1
			ans = max(ans,curr)

	 j range(w) range w curr = H[i][j] + W[j][i] - 1 curr H[i][j] + W[j][i] - 1 H[i][j] + W[j][i] H[i][j] [i] H i j W[j][i] [j] W j i 1 ans = max(ans,curr) ans max(ans,curr) max ans curr return ans ans L L h h w w H,W = list(map(int, stdin.readline().rstrip().split())) H list(map(int, stdin.readline().rstrip().split())) list map(int, stdin.readline().rstrip().split()) map int stdin.readline().rstrip().split() stdin.readline().rstrip().split stdin.readline().rstrip() stdin.readline().rstrip stdin.readline() stdin.readline stdin readline rstrip split W L = [] L [] for m in range(H):
	L.append(list(input())) m range(H) range H L.append(list(input())) L.append L append list(input()) list input() input ans = solve(L,H,W) ans solve(L,H,W) solve L H W print(ans) print ans W = list(map(int, stdin.readline().rstrip().split())) list(map(int, stdin.readline().rstrip().split())) W def solve(L,h,w):
	T = transpose(L)
	l = giveLightIntervals(L,h,w)
	t = giveLightIntervals(T,w,h)

	H = [[0 for i in range(w)] for j in range(h)]
	W = [[0 for i in range(h)] for j in range(w)]

	for i in range(h):
		zz = 0
		for j in range(w):
			if(len(l[i]) > zz):
				s,e = l[i][zz]
				val = e - s + 1
				if(s <= j <= e):
					H[i][j] = val
				if(j == e):
					zz += 1
			else:
				break

	for i in range(w):
		zz = 0
		for j in range(h):
			if(len(t[i]) > zz):
				s,e = t[i][zz]
				val = e - s + 1
				if(s <= j <= e):
					W[i][j] = val
				if(j == e):
					zz += 1
			else:
				break

	ans = 0

	for i in range(h):
		for j in range(w):
			curr = H[i][j] + W[j][i] - 1
			ans = max(ans,curr)

	return ans def solve(L,h,w):
	T = transpose(L)
	l = giveLightIntervals(L,h,w)
	t = giveLightIntervals(T,w,h)

	H = [[0 for i in range(w)] for j in range(h)]
	W = [[0 for i in range(h)] for j in range(w)]

	for i in range(h):
		zz = 0
		for j in range(w):
			if(len(l[i]) > zz):
				s,e = l[i][zz]
				val = e - s + 1
				if(s <= j <= e):
					H[i][j] = val
				if(j == e):
					zz += 1
			else:
				break

	for i in range(w):
		zz = 0
		for j in range(h):
			if(len(t[i]) > zz):
				s,e = t[i][zz]
				val = e - s + 1
				if(s <= j <= e):
					W[i][j] = val
				if(j == e):
					zz += 1
			else:
				break

	ans = 0

	for i in range(h):
		for j in range(w):
			curr = H[i][j] + W[j][i] - 1
			ans = max(ans,curr)

	return ans solve def giveLightIntervals(L,h,w):
	l = [[] for i in range(h)]
	for i in range(h):
		s,e,c = '','',0
		for j in range(w):
			if(L[i][j] == '#'):
				if(c > 0):
					e = j
					l[i].append([s,e-1])
					c = 0
				s,e = '',''
			else:
				if(s == ''):
					s = j
				c += 1
		if(L[i][-1] == '.'):
			l[i].append([s,w-1])
	return l def giveLightIntervals(L,h,w):
	l = [[] for i in range(h)]
	for i in range(h):
		s,e,c = '','',0
		for j in range(w):
			if(L[i][j] == '#'):
				if(c > 0):
					e = j
					l[i].append([s,e-1])
					c = 0
				s,e = '',''
			else:
				if(s == ''):
					s = j
				c += 1
		if(L[i][-1] == '.'):
			l[i].append([s,w-1])
	return l giveLightIntervals ans = solve(L,H,W) solve(L,H,W) ans def transpose(m):
	rez = [[m[j][i] for j in range(len(m))] for i in range(len(m[0]))] 
	return rez def transpose(m):
	rez = [[m[j][i] for j in range(len(m))] for i in range(len(m[0]))] 
	return rez transpose H,W = list(map(int, stdin.readline().rstrip().split())) list(map(int, stdin.readline().rstrip().split())) H L = [] [] L
# ANSHUL GAUTAM
# IIIT-D

from math import *
from copy import *					# ll = deepcopy(l)
from heapq import *					# heappush(hp,x)
from string import *				# alpha = ascii_lowercase
from random import *				# l.sort(key=lambda l1:l1[0]-l1[1]) => ex: sort on the basis difference
from bisect import *				# bisect_left(arr,x,start,end)  => start and end parameters are temporary
from sys import stdin				# bisect_left return leftmost position where x should be inserted to keep sorted
from sys import maxsize				# minn = -maxsize
from operator import *				# d = sorted(d.items(), key=itemgetter(1))
from itertools import *				# pre = [0] + list(accumulate(l))
from decimal import Decimal 		# a = Decimal(a)	# use this for math questions
from collections import Counter		# d = dict(Counter(l))
from collections import defaultdict # d = defaultdict(list)

'''
4 6
#..#..
.....#
....#.
#.#...
'''

def transpose(m):
	rez = [[m[j][i] for j in range(len(m))] for i in range(len(m[0]))] 
	return rez

def giveLightIntervals(L,h,w):
	l = [[] for i in range(h)]
	for i in range(h):
		s,e,c = '','',0
		for j in range(w):
			if(L[i][j] == '#'):
				if(c > 0):
					e = j
					l[i].append([s,e-1])
					c = 0
				s,e = '',''
			else:
				if(s == ''):
					s = j
				c += 1
		if(L[i][-1] == '.'):
			l[i].append([s,w-1])
	return l

def solve(L,h,w):
	T = transpose(L)
	l = giveLightIntervals(L,h,w)
	t = giveLightIntervals(T,w,h)

	H = [[0 for i in range(w)] for j in range(h)]
	W = [[0 for i in range(h)] for j in range(w)]

	for i in range(h):
		zz = 0
		for j in range(w):
			if(len(l[i]) > zz):
				s,e = l[i][zz]
				val = e - s + 1
				if(s <= j <= e):
					H[i][j] = val
				if(j == e):
					zz += 1
			else:
				break

	for i in range(w):
		zz = 0
		for j in range(h):
			if(len(t[i]) > zz):
				s,e = t[i][zz]
				val = e - s + 1
				if(s <= j <= e):
					W[i][j] = val
				if(j == e):
					zz += 1
			else:
				break

	ans = 0

	for i in range(h):
		for j in range(w):
			curr = H[i][j] + W[j][i] - 1
			ans = max(ans,curr)

	return ans


H,W = list(map(int, stdin.readline().rstrip().split()))
L = []
for m in range(H):
	L.append(list(input()))
ans = solve(L,H,W)
print(ans)

