n = int(input()) try: a = [int(input()) for i in range(n)] s = list({sum(a) - a[i] for i in range(n)}) print(s[-2]) except: print('"assert"')