You still have a similar formula. The probability of getting none of these happen is the product of probabilities of each not happening, and thus you get

in the formula you posted. Now in this variation although the probabilities are not identical, the principle is the same - you just need to replace those with the corresponding probabilities.