x, y, c = int(input()), int(input()), int(input())
if x > y + c:
print(x)
elif y > x + с:
print(y)
elif c > x + y:
print(c)
x, y, c = int(input()), int(input()), int(input())
if x > y + c:
print(x)
elif y > x + с:
print(y)
elif c > x + y:
print(c)