H,W = gets.split.map &:to_i
gr = Array.new(H){Array.new(W)}
lh = Array.new(W,0)
hfrom = Array.new(W,0)
H.times do |h|
	s = gets.chomp
	lw = 0
	wfrom = 0
	W.times do |w|
		if s[w] == '#'
			gr[h][w] = 0
			(wfrom...w).each do |e|
				gr[h][e] = lw
			end
			wfrom = w+1
			lw = 0
			(hfrom[w]...h).each do |e|
				gr[e][w] += lh[w]-1
			end
			hfrom[w] = h+1
			lh[w] = 0
			next
		end
		lw += 1
		lh[w] += 1
	end
	(wfrom...W).each do |e|
		gr[h][e] = lw
	end
end
W.times do |w|
	(hfrom[w]...H).each do |e|
		gr[e][w] += lh[w]-1
	end
end
p gr.map{|arr|arr.max}.max