n = int(input()) numlist = [] flag = 0 for i in range(n): num = input() if " " in num: print('"assert"') flag = 1 break else: numlist.append(int(num)) if flag:exit() i = 0 l = [] l.append(numlist[0]+numlist[1]) l.append(numlist[1]+numlist[2]) l.append(numlist[0]+numlist[2]) l = list(set(l)) l.sort(reverse=True) for i in l: i = str(i) print(l[1])