In that case, let's use it up.
There is only one attack, and the probability is 0. 1.
Attack twice, probability =0.9*0.2.
Attack three times, probability =0.9*0.8*0.3.
Attack four times, probability =0.9*0.8*0.7*04.
.. and so on, attack ten times, the probability = 0.9 * 0.8 * 0.7 * 0.6 * 0.5 * 0.4 * 0.3 * 0.2 *1.
Then define E=∑P*N according to expectations, where n is the number of attacks and p is the corresponding probability, and it can be calculated.