Updated the calculate function. It outputs the schedule without 1st and
5th class if it can be.