N = int(input()) A = input() if " " in A: print("\"assert\"") else: data = [0] * 3 data[0] = int(A) for i in range(2): data[i + 1] = int(input()) res = set() res.add(data[0] + data[1]) res.add(data[1] + data[2]) res.add(data[2] + data[0]) print(sorted(list(res), reverse = True)[1])