急流勇退

Idiom

 * 1) withdrawing (receding, drawing back) while ahead (often so as to avoid disaster, etc.)