The CM of the marble travels in a circle of radius R-r inside the loop-the-loop, so at the top,XXX.To remain in contact with the track XXX.If we assume that energy is conserved between the initial position of the marble (A) and the top of the loop-the-loop (B), and use XXX, we find XXX or XXX.