損して得取る(そんしてとくとる)

Japanese vocabulary

Meaning: you must lose a fly to catch a trout; sometimes the best gain is to lose

See it used in real works