You have to do your schoolwork, believe me it will pay off and save you lots of struggle.
And of course always stick with your friends, it wil make your life happier trust me.
So yeah a balance. Try to finish your HW ASAP so that you will have free time later to spend with friends and not worry about falling behind on schoolwork.