n = int(input()) assert_list = list(map(int,input().split())) res = 0 if len(assert_list) == 3: res = '"assert"' else: added_list = [int(input()) for i in range(2)] added_list.insert(0, assert_list[0]) a, b, c = added_list res_list = [a + b, b + c, c + a] sorted_res_list = sorted(res_list) res = sorted_res_list[1] print(res)