n=input() buf=input() if len(buf.split())==3: print('assert') else: for i in range(2): buf.append(input()) numbers=list(map(int,buf)) numbers.sort() ans = numbers[0]*2 if numbers[0]==numbers[1] else numbers[0]+numbers[2] print(ans)