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

l = Array.new(h) { Array.new(w) }
r = Array.new(h) { Array.new(w) }
u = Array.new(h) { Array.new(w) }
d = Array.new(h) { Array.new(w) }
max = 0

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

  w.times do |j|
    l[i][j] = s[i][j] == '#' ? (cur_l = 0) : cur_l += 1
    r[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|
    u[j][i] = s[j][i] == '#' ? (cur_u = 0) : cur_u += 1
    d[h - 1 - j][i] = s[h - 1 - j][i] == '#' ? (cur_d = 0) : cur_d += 1
  end
end

h.times do |i|
  w.times do |j|
    next if s[i][j] == '#'

    max = [l[i][j] + r[i][j] + u[i][j] + d[i][j] - 3, max].max
  end
end

puts max