N = int(input()) a = [int(i) for i in input().split()] if a.__len__() > 2: print("assert") else: for i in range(2): a.append(int(input())) a.sort() print(a[1])