First of all, you must love life and love your studies. Sex cannot stop you. It depends on how you define "sex"; when this happens to you, you can think more about your studies. , do other things, like you said, listen to music, or do some exercise. I wish you a happy study and good health in the new year!