https://www.acmicpc.net/problem/5596
import java.util.*;
public class Main {
public static void main(String args[]) {
Scanner s=new Scanner(System.in);
int sum=0;
int sum1=0;
for(int i=0;i<4;i++) sum+=s.nextInt();
for(int i=0;i<4;i++) sum1+=s.nextInt();
int max=Math.max(sum,sum1);
System.out.print(max);
}
}