N = int(input()) A = [] for _ in range(N): a = input() if a.find(" ")>=0: print('"assert"') exit() A.append(int(a)) B = set() for i in range(N): for j in range(i+1, N): B.add(A[i]+A[j]) B = list(B) B.sort(reverse=True) print(B) print(B[1])