H,W = gets.chomp.split(" ").map(&:to_i)
@arr = readlines.map{|n| n.chomp.split("")}
# v_mat = Array.new(H).map{Array.new(W,0)}
# h_mat = Array.new(H).map{Array.new(W,0)}

light_num_mat = Array.new(H).map{Array.new(W,0)}


# p H,W,@arr
# p v_mat, h_mat

def light_num(i,j)
    i_ = i; j_ = j
    num = 0
    return num if @arr[i][j] == "#"
    num +=1
    while(true)
        i_ += 1
        break if i_ >= H or @arr[i_][j_] == "#"
        num += 1
    end
    i_ = i; j_ = j
    while(true)
        i_ -= 1
        break if 0 > i_ or @arr[i_][j_] == "#" 
        num += 1
    end
    i_ = i; j_ = j
    while(true)
        j_ += 1
        break if j_ >= W or @arr[i_][j_] == "#"
        num += 1
    end
    i_ = i; j_ = j
    while(true)
        j_ -= 1
        break if 0 > j_ or @arr[i_][j_] == "#"
        num += 1
    end
    num
end

# p light_num(0,0)
# p light_num(0,1)
# p light_num(0,2)
# p light_num(0,3)
# p light_num(0,4)
# p light_num(0,5)

max = 0
(0...H).each do |i|
    (0...W).each do |j|
        tmp = light_num(i,j)
        max = max > tmp ? max : tmp
    end
end

puts max