How to make sure that the bullet after the rebound does not lose speed

I need the bullet not to lose speed when ricocheting off the wall and be in constant motion.