require 'pp'
h, w = gets.chomp.split(" ").map(&:to_i)
is_wall = [[true] * (w + 2)]
for i in 1..h
	is_wall[i] = [true] + gets.chomp.split("").map { |char| char == '#' } + [true]
end
is_wall << [true] * (w + 2)

left = Array.new(h+2){Array.new(w+2,nil)}
right = Array.new(h+2){Array.new(w+2,nil)}
up = Array.new(h+2){Array.new(w+2,nil)}
down = Array.new(h+2){Array.new(w+2,nil)}

answer = 0

for x in 0..w+1
	for y in 0..h+1
		if is_wall[y][x]
			left[y][x] = 0
			up[y][x] = 0
		else
			if is_wall[y][x-1]
				left[y][x] = 1
			else
				left[y][x] = left[y][x-1] + 1
			end

			if is_wall[y-1][x]
				up[y][x] = 1
			else
				up[y][x] = up[y-1][x] + 1
			end
		end
	end
end

(w + 1).downto(0) do |x|
	(h + 1).downto(0) do |y|
		if is_wall[y][x]
			right[y][x] = 0
			down[y][x] = 0
		else
			if is_wall[y][x+1]
				right[y][x] = 1
			else
				right[y][x] = right[y][x+1] + 1
			end

			if is_wall[y+1][x]
				down[y][x] = 1
			else
				down[y][x] = down[y+1][x] + 1
			end
		end
		all = left[y][x] + right[y][x] + up[y][x] + down[y][x] - 3
		answer = all if answer < all
	end
end

puts answer