It will help if you learn about adiabatic invariants, cf. the material from the IPhO-2012 web page. Keep in mind that while in general, an adiabatic invariant is conserved by a slowly evolving potential, it is not conserved during separatrix crossing (when the phase trajectory is crossing a separatrix so that the area of a new loop is added to the existing adiabatic invariant).
Please submit the solution of this problem via e-mail to firstname.lastname@example.org.
For full regulations, see the “Participate” tab.