import collections
n,m = map(int, raw_input().split(' '))
matrix = [list(raw_input()) for _ in range(n)]
dpleft = [[0 for j in range(m)] for i in range(n)]
dpright = [[0 for j in range(m)] for i in range(n)]
dpup = [[0 for j in range(m)] for i in range(n)]
dpdown = [[0 for j in range(m)] for i in range(n)]

for i in range(n):
	cumul = 0
	for j in range(m):
		if matrix[i][j] == '#':
			cumul = 0
		else:
			dpleft[i][j] = cumul
			cumul +=1

	cumul = 0
	for j in range(m-1,-1,-1):
		if matrix[i][j] == '#':
			cumul = 0
		else:
			dpright[i][j] = cumul
			cumul +=1

for j in range(m):
	cumul = 0
	for i in range(n):
		if matrix[i][j] == '#':
			cumul = 0
		else:
			dpup[i][j] = cumul
			cumul +=1

	cumul = 0
	for i in range(n-1,-1,-1):
		if matrix[i][j] == '#':
			cumul = 0
		else:
			dpdown[i][j] = cumul
			cumul +=1
r = 0
for i in range(len(matrix)):
	for j in range(len(matrix[0])):
		if matrix[i][j] != '#':
			r = max(r, 1 + dpleft[i][j] + dpright[i][j] + dpdown[i][j] + dpup[i][j])

print r import collections collections n,m = map(int, raw_input().split(' ')) n map(int, raw_input().split(' ')) map int raw_input().split(' ') ().split () raw_input split ' ' m list(raw_input()) for _ in range(n) for _ in range(n) _ range(n) range n for _ in range(n) list(raw_input()) list raw_input() raw_input matrix = [list(raw_input()) for _ in range(n)] matrix [list(raw_input()) for _ in range(n)] [0 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) [0 for j in range(m)] dpleft = [[0 for j in range(m)] for i in range(n)] dpleft [[0 for j in range(m)] for i in range(n)] [0 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) [0 for j in range(m)] dpright = [[0 for j in range(m)] for i in range(n)] dpright [[0 for j in range(m)] for i in range(n)] [0 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) [0 for j in range(m)] dpup = [[0 for j in range(m)] for i in range(n)] dpup [[0 for j in range(m)] for i in range(n)] [0 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) [0 for j in range(m)] dpdown = [[0 for j in range(m)] for i in range(n)] dpdown [[0 for j in range(m)] for i in range(n)] for i in range(n):
	cumul = 0
	for j in range(m):
		if matrix[i][j] == '#':
			cumul = 0
		else:
			dpleft[i][j] = cumul
			cumul +=1

	cumul = 0
	for j in range(m-1,-1,-1):
		if matrix[i][j] == '#':
			cumul = 0
		else:
			dpright[i][j] = cumul
			cumul +=1 i range(n) range n cumul = 0 cumul 0 for j in range(m):
		if matrix[i][j] == '#':
			cumul = 0
		else:
			dpleft[i][j] = cumul
			cumul +=1

	 j range(m) range m if matrix[i][j] == '#':
			cumul = 0
		else:
			dpleft[i][j] = cumul
			cumul +=1

	 matrix[i][j] == '#' matrix[i][j] [i] matrix i j '#' cumul = 0 cumul 0 dpleft[i][j] = cumul dpleft[i][j] [i] dpleft i j cumul cumul +=1 cumul 1 cumul = 0 cumul 0 for j in range(m-1,-1,-1):
		if matrix[i][j] == '#':
			cumul = 0
		else:
			dpright[i][j] = cumul
			cumul +=1 j range(m-1,-1,-1) range m-1 m 1 -1 -1 if matrix[i][j] == '#':
			cumul = 0
		else:
			dpright[i][j] = cumul
			cumul +=1 matrix[i][j] == '#' matrix[i][j] [i] matrix i j '#' cumul = 0 cumul 0 dpright[i][j] = cumul dpright[i][j] [i] dpright i j cumul cumul +=1 cumul 1 for j in range(m):
	cumul = 0
	for i in range(n):
		if matrix[i][j] == '#':
			cumul = 0
		else:
			dpup[i][j] = cumul
			cumul +=1

	cumul = 0
	for i in range(n-1,-1,-1):
		if matrix[i][j] == '#':
			cumul = 0
		else:
			dpdown[i][j] = cumul
			cumul +=1 j range(m) range m cumul = 0 cumul 0 for i in range(n):
		if matrix[i][j] == '#':
			cumul = 0
		else:
			dpup[i][j] = cumul
			cumul +=1

	 i range(n) range n if matrix[i][j] == '#':
			cumul = 0
		else:
			dpup[i][j] = cumul
			cumul +=1

	 matrix[i][j] == '#' matrix[i][j] [i] matrix i j '#' cumul = 0 cumul 0 dpup[i][j] = cumul dpup[i][j] [i] dpup i j cumul cumul +=1 cumul 1 cumul = 0 cumul 0 for i in range(n-1,-1,-1):
		if matrix[i][j] == '#':
			cumul = 0
		else:
			dpdown[i][j] = cumul
			cumul +=1 i range(n-1,-1,-1) range n-1 n 1 -1 -1 if matrix[i][j] == '#':
			cumul = 0
		else:
			dpdown[i][j] = cumul
			cumul +=1 matrix[i][j] == '#' matrix[i][j] [i] matrix i j '#' cumul = 0 cumul 0 dpdown[i][j] = cumul dpdown[i][j] [i] dpdown i j cumul cumul +=1 cumul 1 r = 0 r 0 for i in range(len(matrix)):
	for j in range(len(matrix[0])):
		if matrix[i][j] != '#':
			r = max(r, 1 + dpleft[i][j] + dpright[i][j] + dpdown[i][j] + dpup[i][j]) i range(len(matrix)) range len(matrix) len matrix for j in range(len(matrix[0])):
		if matrix[i][j] != '#':
			r = max(r, 1 + dpleft[i][j] + dpright[i][j] + dpdown[i][j] + dpup[i][j]) j range(len(matrix[0])) range len(matrix[0]) len matrix[0] matrix 0 if matrix[i][j] != '#':
			r = max(r, 1 + dpleft[i][j] + dpright[i][j] + dpdown[i][j] + dpup[i][j]) matrix[i][j] != '#' matrix[i][j] [i] matrix i j '#' r = max(r, 1 + dpleft[i][j] + dpright[i][j] + dpdown[i][j] + dpup[i][j]) r max(r, 1 + dpleft[i][j] + dpright[i][j] + dpdown[i][j] + dpup[i][j]) max r 1 + dpleft[i][j] + dpright[i][j] + dpdown[i][j] + dpup[i][j] 1 + dpleft[i][j] + dpright[i][j] + dpdown[i][j] 1 + dpleft[i][j] + dpright[i][j] 1 + dpleft[i][j] 1 dpleft[i][j] [i] dpleft i j dpright[i][j] [i] dpright i j dpdown[i][j] [i] dpdown i j dpup[i][j] [i] dpup i j print cumul +=1 1 cumul cumul +=1 1 cumul cumul = 0 0 cumul dpdown = [[0 for j in range(m)] for i in range(n)] [[0 for j in range(m)] for i in range(n)] dpdown matrix = [list(raw_input()) for _ in range(n)] [list(raw_input()) for _ in range(n)] matrix cumul +=1 1 cumul r = max(r, 1 + dpleft[i][j] + dpright[i][j] + dpdown[i][j] + dpup[i][j]) max(r, 1 + dpleft[i][j] + dpright[i][j] + dpdown[i][j] + dpup[i][j]) r cumul = 0 0 cumul dpright = [[0 for j in range(m)] for i in range(n)] [[0 for j in range(m)] for i in range(n)] dpright cumul = 0 0 cumul dpleft = [[0 for j in range(m)] for i in range(n)] [[0 for j in range(m)] for i in range(n)] dpleft cumul = 0 0 cumul cumul = 0 0 cumul n,m = map(int, raw_input().split(' ')) map(int, raw_input().split(' ')) n cumul = 0 0 cumul cumul = 0 0 cumul m = map(int, raw_input().split(' ')) map(int, raw_input().split(' ')) m dpup = [[0 for j in range(m)] for i in range(n)] [[0 for j in range(m)] for i in range(n)] dpup cumul = 0 0 cumul cumul +=1 1 cumul r = 0 0 r
import collections
n,m = map(int, raw_input().split(' '))
matrix = [list(raw_input()) for _ in range(n)]
dpleft = [[0 for j in range(m)] for i in range(n)]
dpright = [[0 for j in range(m)] for i in range(n)]
dpup = [[0 for j in range(m)] for i in range(n)]
dpdown = [[0 for j in range(m)] for i in range(n)]

for i in range(n):
	cumul = 0
	for j in range(m):
		if matrix[i][j] == '#':
			cumul = 0
		else:
			dpleft[i][j] = cumul
			cumul +=1

	cumul = 0
	for j in range(m-1,-1,-1):
		if matrix[i][j] == '#':
			cumul = 0
		else:
			dpright[i][j] = cumul
			cumul +=1

for j in range(m):
	cumul = 0
	for i in range(n):
		if matrix[i][j] == '#':
			cumul = 0
		else:
			dpup[i][j] = cumul
			cumul +=1

	cumul = 0
	for i in range(n-1,-1,-1):
		if matrix[i][j] == '#':
			cumul = 0
		else:
			dpdown[i][j] = cumul
			cumul +=1
r = 0
for i in range(len(matrix)):
	for j in range(len(matrix[0])):
		if matrix[i][j] != '#':
			r = max(r, 1 + dpleft[i][j] + dpright[i][j] + dpdown[i][j] + dpup[i][j])

print r