$h, $w = gets.split.map(&:to_i)
ss = $h.times.map{|i| gets.chomp.chars }

left = Array.new($h){ Array.new($w) }
right = Array.new($h){ Array.new($w) }
up = Array.new($h){ Array.new($w) }
down = Array.new($h){ Array.new($w) }

$h.times do |hi|
  $w.times do |wi|
    if ss[hi][wi] == '#'
      up[hi][wi] = 0
      left[hi][wi] = 0
    else
      up[hi][wi] = (hi == 0) ? 1 : up[hi-1][wi] + 1
      left[hi][wi] = (wi == 0) ? 1 : left[hi][wi-1] + 1
    end
  end
end

result = 0
$h.times.reverse_each do |hi|
  $w.times.reverse_each do |wi|
    if ss[hi][wi] == '#'
      down[hi][wi] = 0
      right[hi][wi] = 0
    else
      down[hi][wi] = (hi == $h-1) ? 1 : down[hi+1][wi] + 1
      right[hi][wi] = (wi == $w-1) ? 1 : right[hi][wi+1] + 1
      r = up[hi][wi] + down[hi][wi] + left[hi][wi] + right[hi][wi]
      result = r if r > result
    end
  end
end

p result - 3
