h, w = gets.chomp.split.map(&:to_i)
map = []
h.times{map << gets.chomp}

arr = Array.new(h){Array.new(w){[]}}
h.times{|y|
    last = nil
    w.times{|x|
        if map[y][x] == '#'
            last = x
        else
            arr[y][x] << last
        end
    }
    last = nil
    (w - 1).downto(0){|x|
        if map[y][x] == '#'
            last = x
        else
            arr[y][x] << last
        end
    }
}
w.times{|x|
    last = nil
    h.times{|y|
        if map[y][x] == '#'
            last = y
        else
            arr[y][x] << last
        end
    }
    last = nil
    (h - 1).downto(0){|y|
        if map[y][x] == '#'
            last = y
        else
            arr[y][x] << last
        end
    }
}
max = 0
h.times{|y|
    w.times{|x|
        next if arr[y][x].empty?
        z = 1
        if arr[y][x][0].nil?
            z += x
        else
            z += x - arr[y][x][0] - 1
        end
        if arr[y][x][1].nil?
            z += w - x - 1
        else
            z += arr[y][x][1] - x - 1
        end
        if arr[y][x][2].nil?
            z += y
        else
            z += y - arr[y][x][2] - 1
        end
        if arr[y][x][3].nil?
            z += h - y - 1
        else
            z += arr[y][x][3] - y - 1
        end
        max = z if max < z
    }
}
puts max
