$\begin{array}{ll} \text{Final amount of ingredient that is not replaced} & = \text{Initial amount} \times \bigg( 1 - \frac{\text{replace}}{\text{total}} \bigg) ^n \\ & = 50 \times \bigg( 1 - \frac{5}{50} \bigg) ^3 \\ & = 50 \times \frac{9}{10} \frac{9}{10} \frac{9}{10} \\ & = 36.45 \text{ltrs} \end{array}$