Answer: 17
Taking any one element, using bruteforce logic, as average is asked, lets take element '4',
Now, above 4;
First, we need to push 3,2,1 which takes 15(push-operation delay) + 3(intermediate operation delay) = 18
And also, we need to consider its pop operations, as the life of the element in stack is defined by its presence, pop 1,2,3
which takes 33(pop-operation delay) + 3(intermediate operation delay) = 33
We get (18+33)/3 {as we are considering 3 elements here (1,2,3)} = 17
Similarly for other elements as well we would get a similar average lifespan.