B - Term Strategy
Time Limit: 1 sec
Memory Limit: 16MB
Student Peter was playing billiard all the term and for that reason he missed all his lectures. Unfortunately that's the time for term exams which Peter must pass.
Peter has N (1 <= N <= 10) courses, because he completely failed the previous term exams so he has to pass them too. He is already late with his exams and the deadline is coming. He agreed with all teachers to pass all the exams in one day. The idea he followed is - "Everything or nothing". After he made some considerations and an assumption that we'll play billiard only 5 hours a day, he counted the number of hours he has left to get himself prepared for ex