h, w = gets.split.map(&:to_i)
s = h.times.map{gets.chomp}
max_row = 0
max_col = 0
ans = 0
0.upto(h-1) do |i|
    row = 0
    tmp = 0
    0.upto(w-1) do |j|
        if s[i][j] == '.'
            tmp += 1
        else
            row = tmp if row < tmp
            tmp = 0
        end
    end
    row = tmp if row < tmp
    max_row = row if row > max_row
end
0.upto(w-1) do |i|
    col = 0
    tmp = 0
    0.upto(h-1) do |j|
        if s[j][i] == '.'
            tmp += 1
        else
            col = tmp if col < tmp
            tmp = 0
        end
    end
    col = tmp if col < tmp
    max_col = col if col > max_col
end
if max_row != 0 && max_col != 0
    puts max_row + max_col - 1
else
    puts 0
end