5. Dima has 25 identical bricks of size $5 \times 14 \times 17$. Dima wants to build a tower from all his bricks, each time adding one more brick on top (each new brick adds 5, 14, or 17 to the current height of the tower). We will call a number $n$ constructible if Dima can build a tower of height exactly $n$. How many constructible numbers exist?
Answer: 98.

In essence, we need to find the number of different towers by height that can be built from the given set of bricks.

Mentally reduce the length, width, and height of each brick by 5: from $5 \times 14 \times 17$ to $0 \times 9 \times 12$. Then the total height of a potential tower will decrease by $25 \cdot 5$, and the number of different towers by height, composed of the new bricks, will coincide with the number of different towers by height from the old ones. Now reduce the dimensions of the bricks by three times: from $0 \times 9 \times 12$ to $0 \times 3 \times 4$. The sizes of potential towers will also decrease by three times, and the number of different towers by height will remain unchanged.

Thus, the original problem is equivalent to the following: how many different values can be obtained by adding the numbers $0,3,4$ in a quantity of 25? Note that if the number 3 appears at least four times in the sum, then the set $3,3,3,3$ can be replaced by the set $4,4,4,0$; with this replacement, both the sum and the number of numbers remain the same. Therefore, we can consider only those sums where the number 3 appears no more than three times.

If the number 3 appears 0 times, then there are 26 different values of the sum: $0,4,8, \ldots, 4 \cdot 25$.

If the number 3 appears 1 time, then there are 25 different values of the sum: $3,3+4,3+8, \ldots, 3+4 \cdot 24$.

If the number 3 appears 2 times, then there are 24 different values of the sum: $6,6+4,6+8, \ldots, 6+4 \cdot 23$.

If the number 3 appears 3 times, then there are 23 different values of the sum: $9,9+4,9+8, \ldots, 9+4 \cdot 22$.

The values in the first, second, third, and fourth lists give remainders when divided by 4 of $0,3,2,1$, respectively, and therefore the values in different lists are different.

In total, $26+25+24+23=98$ possible values of the tower height.