i=input n=int(i()) a=i() if ' ' in a: print("\"assert\"") else: a=int(a) b=int(i()) c=int(i()) l=sorted(list(set([a+b,b+c,c+a]))) print(l[-2])