h, w = gets.split.map(&:to_i)
s = Array.new(h).map{gets.chomp}
ver = Array.new(h).map{Array.new(w, nil)}
hol = Array.new(h).map{Array.new(w, nil)}
h.times do |hi|
  c = false
  w.times do |wi|
    if s[hi][wi] == "." && !c then
      c = wi
    elsif s[hi][wi] == "#" && c then
      ver[hi][wi - 1] = wi - c
      c = false
    end
  end
  ver[hi][w - 1] = w - c if c
  (w - 1).downto 0 do |wi|
    if s[hi][wi] == "." then
      if ver[hi][wi] then
        c = ver[hi][wi]
      else
        ver[hi][wi] = c
      end
    end
  end
end

max = 0

w.times do |wi|
  c = false
  h.times do |hi|
    if ver[hi][wi] && !c then
      c = hi
    elsif !ver[hi][wi] && c then
      hol[hi - 1][wi] = hi - c
      c = false
    end
  end
  hol[h - 1][wi] = h - c if c
  (h - 1).downto 0 do |hi|
    if ver[hi][wi] then
      c = hol[hi][wi] - 1 if hol[hi][wi]
      max = c + ver[hi][wi] if max < c + ver[hi][wi]
    end
  end
end

puts max
