N = int(input()) *A, = map(int, input().split()) if len(A) == N: print("\"assert\"") quit() a = A[0] b = int(input()) c = int(input()) S = sorted({a + b, b + c, c + a}) S.pop() print(S.pop())