N=int(input()) E=list(map(int,input().split())) if len(E)==3: print("\"assert\"") else: F=int(input()) G=int(input()) H=E[0] ushitapunichiakun=[] ushitapunichiakun.append(F+G); ushitapunichiakun.append(G+H); ushitapunichiakun.append(F+H); ushitapunichiakun.sort() if ushitapunichiakun[1]==ushitapunichiakun[2]: print(ushitapunichiakun[0]) else: print(ushitapunichiakun[1])