A block of mass m is dropped onto a spring of spring constant k from a height h. The second end of the spring is attached to a second block of mass M as shown in figure. Find the minimum value of h so that the block M bounces off the ground, if the block of mass m sticks to the spring immediately after it comes into contact with it.