loop do
    h, w = gets.split.map(&:to_i)
    break if h == 0
    input = (1..h).map { gets.chomp.split("") }

    m = 0

    b = Hash.new(0)
    (0..h-1).each do |k|
        c = Hash.new(0)
        (0..w-1).each do |i|
            next if input[k][i] == ?*
            (i..w-1).each do |j|
                break if input[k][j] == ?*
                c[[i,j]] = b[[i,j]] + (j - i + 1)
                m = c[[i,j]] if c[[i,j]] > m
            end
        end
        b = c
    end

    p m
end


