I have a question, where I have a mass on top of a building, we give it initial velocity of $\sqrt{gd/2}$ then it starts colliding between 2 buildings, elastic collision. I have to find how many times it will collide between the 2 building before getting to the ground. I know I have to use harmonic motion because everything is conserved since it's elastic collision, and the distance between the buildings won't change. but I don't know how to find the equation I need. some help please?
http://s31.postimg.org/w8pxx9mrv/Untitled.png
this link is the picture and answers I have from the question.