h, w = gets.chomp.split(' ').map(&:to_i)
grid = []
h.times do
  grid << gets.chomp.split('')
end
yoko = []
(0...h).each do |i|
  tmp = []
  count = 0
  (0...w).each do |j|
    if grid[i][j] == '.'
      count += 1
    else
      tmp += Array.new(count, count)
      tmp += [0]
      count = 0
    end
  end
  tmp += Array.new([1, count].max, count) if count > 0
  yoko << tmp
end
tate = []
(0...w).each do |i|
  tmp = []
  count = 0
  (0...h).each do |j|
    if grid[j][i] == '.'
      count += 1
    else
      tmp += Array.new(count, count)
      tmp += [0]
      count = 0
    end
  end
  tmp += Array.new([1, count].max, count) if count > 0
  tate << tmp
end
tate = tate.transpose
max = 0
(0...h).each do |i|
  (0...w).each do |j|
    max = [max, tate[i][j] + yoko[i][j]].max
  end
end
puts max > 0 ? max - 1 : max