h, w = gets.split.map(&:to_i)
s = Array.new(h).map{Array.new(w)}
for i in 0..(h-1)
  s[i] = gets.chomp.split("")
end

lig = Array.new(h).map{Array.new(w, 0)}

for i in 0..(h-1)
  cnt = 0
  st = en = 0
  for j in 0..(w-1)
    if s[i][j] == "#"
      lig[i][j] = 0
      if cnt > 0
        for k in st..en
          lig[i][k] += cnt
        end
        cnt = 0
      end
    else
      if cnt == 0
        st = j
      end
      en = j
      cnt += 1
      if j == w-1
        for k in st..en
          lig[i][k] += cnt
        end
      end
    end
  end
end

for i in 0..(w-1)
  cnt = 0
  st = en = 0
  for j in 0..(h-1)
    if s[j][i] == "#"
      lig[j][i] = 0
      if cnt > 0
        for k in st..en
          lig[k][i] += cnt - 1
        end
        cnt = 0
      end
    else
      if cnt == 0
        st = j
      end
      en = j
      cnt += 1
      if j == h-1
        for k in st..en
          lig[k][i] += cnt - 1
        end
      end
    end
  end
end

max = 0
for i in 0..(h-1)
  for j in 0..(w-1)
    max = lig[i][j] if max < lig[i][j]
  end
end
puts max