Stochastic pruning and its application for fast estimation of the expected total output of complex systems