You get to keep only enough to maintain a very modest lifestyle in a low-cost-of-living area, the rest of it has to go towards improving the world in some way.
Edit: Given the previous rules that you must maintain a very modest lifestyle in a low-cost-of-living area, would you rather choose to opt out and not have the money at all?
Establish non profit in country that is not part of international patent sytem and move there.
Invest in university(ies) in that country and start close cooperation.
Start making hardware / manufacturing device specifications and publish them as opensource.
Establish something like github but for hardware + manufacturing. Establish open factory / manufacturing project.
Publish free books about building houses / vehicles / electronics / manufacturing.
Invest in alternative opensource software to Autodesk / Solidworks / Catia.
Start open medicine project that shows how medicines are producded from herbs and plants.