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’d immediately invest most of it in stable, developed economies where the far-right doesn’t seem close to taking power—so somewhere like Finland or Singapore—and invest the rest in Syria because God knows they need it. This way I’ll have a permanent stream of change-the-world money that I can use to support pro-democracy and worker organization efforts in the third world and in countries such as Turkey where there are serious efforts to democratize. With whatever remains from that I’d then go around funding relief efforts in Africa and the like.