A mathematical model for early retirement