5. Lena downloaded a new game for her smartphone, where it is allowed to conduct alchemical reactions of two types. If she combines one "fire" element and one "stone" element, she gets one "metal" element. And if she combines one "metal" element and one "stone" element, she gets three "stone" elements. Lena has 50 "fire" elements and 50 "stone" elements. To prepare element $X$, one "metal" element, two "fire" elements, and three "stone" elements are required. What is the maximum number of elements $X$ that Lena can obtain?
Answer: 14 elements.

Solution. Consider the expression $S=2 x+y+z$, where $x$ is the number of "metal" elements, $y$ is the number of "fire" elements, and $z$ is the number of "stone" elements. It is easy to see that this expression does not change with each of the two alchemical operations:

$$
\begin{aligned}
& 2(x+1)+y-1+z-1=2 x+y+z \\
& 2(x-1)+y+z-1+3=2 x+y+z
\end{aligned}
$$

Initially, $S=100$. To obtain $t$ elements of $X$, $t$ elements of "metal", $2 t$ elements of "fire", and $3 t$ elements of "stone" are required, so $S=7 t \leq 100$. Therefore, $t$ does not exceed 14. Fourteen elements of $X$ can be obtained: by combining 21 elements of "fire" and 21 elements of "stone", we get 21 elements of "metal", 29 elements of "fire", and 29 elements of "stone". Then, by combining 7 elements of "metal" and 7 elements of "stone", we obtain 14 elements of "metal", 29 elements of "fire", and 43 elements of "stone". This is enough to prepare 14 elements of $X$.

Comment. The proposed implementation - 3 points, the estimate made - 4 points, the points are summed. For potentially useful ideas and approaches in the absence of a solution - 2-3 points. Answer without justification - 0 points.