失之東隅，收之桑榆

Etymology
Literally: What you lose in the morning, you gain back in the evening.

Proverb

 * 1) to lose one thing but gain another