# -*- coding: utf-8 -*- N = int(input()) A = list(map(int,input().split())) if len(A) == 3: print("\"assert\"") else: A = int(A[0]) B = int(input()) C = int(input()) s = {A + B, B + C, C + A} s = list(s) s.sort() print(s[len(s) - 2])