The mass needed is not as precise as implied by the instructions. I was able to use a mass quite a bit lower than the actual sum.
M = minimum health of all enemies S = sum health of all enemies return S-M
This still wins.
Of course doing this requires more work than just adding up their healths, but it might make room for someone that doesn’t code, but just guesses a number and gets lucky with the random seed.