The answer would be (M * v_0^2) / (2L)
The reason behind this is explained by the work theorem:
Kf – Ki = -.5Mv_0^2
W = -FL
Kf – Ki = W consulting to work energy theorem. This specifies that the alteration
in the kinetic energy of a particle is equivalent to the whole work done on
that particle through all the forces that act on it.
To make things easier to find that F = (M*v_0^2)/2L