P27184 [AtCoder] Score
普及
题目描述

Problem Description

Two students, A and B, from JOI High School took exams in four subjects: Information, Mathematics, Science, and English. Given the scores of these four subjects for both A and B, create a program that outputs the higher total score between A's total score \( S \) and B's total score \( T \). In case of a tie, output \( S \) (which equals \( T \)).


Input Format

The input consists of 2 lines.
The first line contains four integers separated by a single space, representing A's scores in Information, Mathematics, Science, and English, respectively.
The second line contains four integers separated by a single space, representing B's scores in Information, Mathematics, Science, and English, respectively.
Each subject's score is out of 100 points, and no score will be negative.

Output Format

The output consists of a single integer.


Sample Input and Output

Sample Input #1

100 80 70 60
80 70 80 90

Sample Output #1

320

Sample Input #2

100 80 70 60
80 70 60 100

Sample Output #2

310

Notes/Hints

Sample Explanation 1

- - - - - -

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
100 80 70 60 80 70 80 90
样例输出
320