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

s = []
h.times {s << gets.chomp}

ans = 0
h.times do |i|
    w.times do |j|
        next if s[i][j] == "#"

        if i == 0 || s[i-1][j] == "#"
            k = 0
            k += 1 while i + k < h && s[i + k][j] == "."
            a = k
        else
            a = grid[i-1][j][0]
        end

        if j == 0 || s[i][j-1] == "#"
            b = ((x = s[i].index("#", j)).nil? ? w : x) - j
        else
            b = grid[i][j-1][1]
        end
        grid[i][j] = [a, b]
        ans = a + b - 1 if ans < a + b - 1
    end
end

puts ans