Weighted sums of subexponential random variables and their maxima