Conservation of momentum: $mv_0 = (m+M)v_f$

In order to make it around the top of the circle, the speed of the combined masses at the uppermost position needs to satisfy the equation $F_c = (m+M)g = \dfrac{(m+M) \cdot v^2}{R}$, where $F_c$ is the minimum centripetal force necessary to complete the desired circular motion. At the uppermost position, the total mechanical energy of the combined masses (kinetic + gravitational potential) has to $\ge$ the kinetic energy of the combined masses immediately after the collision at the bottom.

See what you can do from here.