print(max([sum(list(map(int, input().split()))) for _ in range(2)]))