h, w = gets.split.map(&:to_i)
ss = []
h.times do
  ss << gets.chomp.chars
end

yokos = []
ss.each do |line|
  cnt = 0
  yy = []
  line.each do |s|
    if s == "#"
      cnt = 0
    else
      cnt += 1
    end
    yy << cnt
  end
  yokos << yy
end
yokos.each do |yoko|
  t = 0
  (w-1).downto(0) do |i|
    yi = yoko[i]
    if yi == 0 || t == 0
      t = yi
    end
    yoko[i] = t
  end
end

tates = []
(0..w-1).each do |i|
  cnt = 0
  yy = []
  (0..h-1).each do |j|
    s = ss[j][i]
    if s == "#"
      cnt = 0
    else
      cnt += 1
    end
    yy << cnt
  end
  tates << yy
end
tates.each do |tate|
  t = 0
  (h-1).downto(0) do |i|
    yi = tate[i]
    if yi == 0 || t == 0
      t = yi
    end
    tate[i] = t
  end
end

# puts yokos.inspect
# puts tates.inspect

ans = -1
(0..h-1).each do |j|
  (0..w-1).each do |i|
    ans = [ans, yokos[j][i] + tates[i][j]].max
  end
end

puts ans-1

