wáng​jǐ​dé​máo

to lose one thing but gain another