#yuki851 n=int(raw_input()) try: a=[] for i in xrange(n): a.append(int(raw_input())) s=[a[0]+a[1],a[1]+a[2],a[2]+a[0]] s.sort() if s[1]==s[2]: print s[0] else: print s[1] except: print '"assert"'