Two masses M1 and M2 are connected with each other with the help of a massless spring of spring-constant k. Mass M1 is in contact with a wall and the system is at rest on the frictionless floor. M2 is displaced by distance x to compress the spring and released. The velocity of COM (centre of mass) of the system when M1 is detached from wall is :