State the law of conservation of energy with example