#B4019. Final Exam Score Calculation

    ID: 11676 Type: Default 1000ms 256MiB

Final Exam Score Calculation

Final Exam Score Calculation

This problem requires you to compute the final score of an exam which is graded by two teachers. There are \( n \) problems in the exam. Each teacher scores every problem individually. The final score is calculated as the ceiling of the average of the total scores given by both teachers. In mathematical terms, if \( S_1 \) denotes the sum of scores given by the first teacher and \( S_2 \) those by the second teacher, then the final score \( F \) is given by:

F=S1+S22F = \left\lceil \frac{S_1 + S_2}{2} \right\rceil

You are given the scores for each problem from both teachers. Your task is to compute the final score.

inputFormat

The input consists of three lines:

  • The first line contains an integer \( n \) representing the number of problems.
  • The second line contains \( n \) space-separated integers, representing the scores given by the first teacher.
  • The third line contains \( n \) space-separated integers, representing the scores given by the second teacher.

outputFormat

Output a single integer representing the final score of the exam.

sample

5
80 90 100 70 60
75 85 95 65 55
388