h, w = gets.split.map(&:to_i)
s = Array.new(h) { gets.chomp.chars }
m = Array.new(h) { Array.new(w) { -3 } }
max = 0

h.times do |i|
  cur_l = cur_r = 0

  w.times do |j|
    m[i][j] += s[i][j] == '#' ? (cur_l = 0) : cur_l += 1
    m[i][w - 1 - j] += s[i][w - 1 - j] == '#' ? (cur_r = 0) : cur_r += 1
  end
end

w.times do |i|
  cur_u = cur_d = 0

  h.times do |j|
    m[j][i] += s[j][i] == '#' ? (cur_u = 0) : cur_u += 1
    m[h - 1 - j][i] += s[h - 1 - j][i] == '#' ? (cur_d = 0) : cur_d += 1
  end

  h.times { |j| max = [m[j][i], max].max }
end

puts max