https://www.acmicpc.net/problem/5596
a,b,c,d=map(int,input().split()) sum=a+b+c+d a,b,c,d=map(int,input().split()) sum1=a+b+c+d ma=max(sum,sum1) print(ma)