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?
I would start a non profit foundation that develops and maintains cost effective, autonomous boats to clean up the great garbage patch.
I am envisioning something like a small fleet of autonomous boats that dock with large motherships dump their cargo of garbage and head out again The motherships can also work with manned crafts that can handle heavier e
The motherships should be nuclear powered, have water treatment plant so the garbage can be dryed and brought to land .