How and When to Resign