Is it true that you always end up with the same energy u put in a system just some is transfered to other types of energy?

For instance if you have a blown up balloon and you compress it. the potential energy is equal to what you compressed it with.

Could you leave a note and your profession.