A bullet having mass m and velocity v collides with a block at rest having mass M. Mass M is attached to a spring which is at its equilibrium position and has a spring constant k. Calculate the compression of the spring when the bullet-mass system comes to rest