This page is still under construction.

Parts of this page are still being built. What you see may change.

Exam Scores

Interview

Time limit1sMemory limit128 MB

Summary
Given the four subject scores of two students, print the larger of the two totals, or Minguk's total when they tie.
Level

Easy1 of 10

Topics
Implementation, Math
Solved
No attempts yet

Problem

Minguk and Manse, students at Daehan High School, each took exams in four subjects: Information, Math, Science, and English. Given both students' four subject scores, write a program that prints the larger of Minguk's total SS and Manse's total TT. If the two totals are equal, print Minguk's total SS.

Input

The input consists of two lines.

The first line contains Minguk's Information, Math, Science, and English scores in that order, given as integers separated by spaces.

The second line contains Manse's Information, Math, Science, and English scores in the same way, given as integers separated by spaces.

Output

Print the larger of Minguk's total SS and Manse's total TT. If the two totals are equal, print SS.

Examples2

  1. Example 1

    Input
    100 80 70 60
    80 70 80 90
    
    Expected output
    320
    
  2. Example 2

    Input
    100 80 70 60
    80 70 60 100
    
    Expected output
    310