Given the task definition and input, reply with output. The task is to generate the correct answer for a given math problem.

Problem: an engineer designed a ball so that when it was dropped , it rose with each bounce exactly one - half as high as it had fallen . the engineer dropped the ball from a 16 - meter platform and caught it after it had traveled 45 meters . how many times did the ball bounce ?
4