A block of mass M with a semicircular groove of radius R rests on a horizontal frictionless surface. A uniform cylinder of radius r and mass m is released from rest from the top point A. The cylinder slips on the semicircular frictionless track. Then find the distance travelled by the block when the cylinder reaches the bottom-most point B.