Protect the fortress (Solution)

43.

The main insight here is realizing that you should arrange the numbers in 6 columns, like so:

So, we can start by crossing off 6, 9, and 20 since the wall-blasters can clearly destroy wall segments of that length:

And now is where our 6 columns pay off. Because your enemies can always add as many 6’s as they want, we can also cross off everything under 6, 9, and 20:

From here on out, it’s just finding the smallest number in each column that you can make with 9 and 20, which appens to be 29, 40, and 49:

So the answer is 43.